1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.4'

* PHP-8.4:
  Add test for GH-16355 (fixed by previous commit)
  Update IR
  UPGRADING: Fix `IntlTimeZone::getIanaID` new method notice
This commit is contained in:
Dmitry Stogov
2024-10-17 17:39:54 +03:00
2 changed files with 38 additions and 0 deletions

View File

@@ -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;
}

View File

@@ -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--
<?php
function test($in, $cond) {
if ($cond) {
eval('');
}
while (stream_bucket_make_writeable($in)) {}
}
?>
DONE
--EXPECT--
DONE