From 951dab74fa97dcfde4b1b3616a0d999be30d8ed4 Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Thu, 17 Oct 2024 19:30:45 +0700 Subject: [PATCH 1/3] UPGRADING: Fix `IntlTimeZone::getIanaID` new method notice This was previously written as `IntlDateFormatter::getIanaID()`, but the new method is added to the `IntlTimeZone` class. [skip ci] --- UPGRADING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADING b/UPGRADING index a200bac03d9..b753545a944 100644 --- a/UPGRADING +++ b/UPGRADING @@ -787,7 +787,7 @@ PHP 8.4 UPGRADE NOTES . Added HashContext::__debugInfo(). - Intl: - . Added IntlDateFormatter::getIanaID()/intltz_get_iana_id() to + . Added IntlTimeZone::getIanaID()/intltz_get_iana_id() to the IANA identifier from a given timezone. . Added grapheme_str_split which allow to support emoji and Variation Selectors. From 68967569294f8fa59d5823341a53293a754c2f97 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 17 Oct 2024 17:31:47 +0300 Subject: [PATCH 2/3] Update IR IR commit: abbdbf2ad7f66b02106f3b51602a21f10f508808 --- ext/opcache/jit/ir/ir_gcm.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ext/opcache/jit/ir/ir_gcm.c b/ext/opcache/jit/ir/ir_gcm.c index 0dbde2fecec..0d816ab88e2 100644 --- a/ext/opcache/jit/ir/ir_gcm.c +++ b/ext/opcache/jit/ir/ir_gcm.c @@ -112,6 +112,25 @@ static uint32_t ir_gcm_select_best_block(ir_ctx *ctx, ir_ref ref, uint32_t lca) bb = &ctx->cfg_blocks[b]; if (bb->loop_depth < loop_depth) { if (!bb->loop_depth) { +#if 1 + /* Avoid LICM if LOOP doesn't have a pre-header block */ + ir_block *loop_bb = &ctx->cfg_blocks[best]; + + if (!(loop_bb->flags & IR_BB_LOOP_HEADER)) { + loop_bb = &ctx->cfg_blocks[loop_bb->loop_header]; + } + if (loop_bb->predecessors_count > 2) { + int n = loop_bb->predecessors_count; + uint32_t *p = ctx->cfg_edges + loop_bb->predecessors; + + while (n && *p != b) { + n--; p++; + } + if (!n) { + break; + } + } +#endif best = b; break; } From c98c198623d313aa91f5b73f8b91b0927f0efd28 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 17 Oct 2024 17:37:52 +0300 Subject: [PATCH 3/3] Add test for GH-16355 (fixed by previous commit) --- ext/opcache/tests/jit/gh16355.phpt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ext/opcache/tests/jit/gh16355.phpt diff --git a/ext/opcache/tests/jit/gh16355.phpt b/ext/opcache/tests/jit/gh16355.phpt new file mode 100644 index 00000000000..b84a8b5255f --- /dev/null +++ b/ext/opcache/tests/jit/gh16355.phpt @@ -0,0 +1,19 @@ +--TEST-- +GH-16355 (Assertion failure in ext/opcache/jit/ir/ir_ra.c:1139) +--EXTENSIONS-- +opcache +--INI-- +opcache.jit=1203 +opcache.jit_buffer_size=64M +--FILE-- + +DONE +--EXPECT-- +DONE