Commit 60959f18e5b for php

commit 60959f18e5b96eeb989f9b003673bc335dadd17d
Author: ndossche <7771979+ndossche@users.noreply.github.com>
Date:   Sun Nov 8 12:21:54 2026 +0100

    Fix merge

diff --git a/ext/opcache/jit/ir/ir_cfg.c b/ext/opcache/jit/ir/ir_cfg.c
index 49b378bc7e8..621f02a2372 100644
--- a/ext/opcache/jit/ir/ir_cfg.c
+++ b/ext/opcache/jit/ir/ir_cfg.c
@@ -1115,7 +1115,8 @@ static IR_NEVER_INLINE void ir_check_loop_entry_in_preds(ir_ctx *ctx, uint32_t h
 	ir_bitset_incl(work->visited, blocks[hdr].idom);
 	ir_worklist_push(work, hdr);
 	while (ir_worklist_len(work)) {
-		ir_block *bb = &blocks[ir_worklist_pop(work)];
+		uint32_t b = ir_worklist_pop(work);
+		ir_block *bb = &blocks[b];

 		if (bb->flags & IR_BB_ENTRY) {
 			blocks[hdr].flags |= IR_BB_LOOP_WITH_ENTRY_IN_PREDS;
@@ -1322,6 +1323,10 @@ int ir_find_loops(ir_ctx *ctx)
 		b = loops;
 		do {
 			bb = &blocks[b];
+			if (ctx->entries_count
+			 && (bb->predecessors_count > 2 || (bb->flags & IR_BB_IRREDUCIBLE_LOOP))) {
+				ir_check_loop_entry_in_preds(ctx, b, &work);
+			}
 			b = bb->next_loop;
 			IR_ASSERT(bb->flags & IR_BB_LOOP_HEADER);
 			bb->loop_depth = (bb->loop_header) ? blocks[bb->loop_header].loop_depth + 1 : 1;
@@ -1353,12 +1358,6 @@ int ir_find_loops(ir_ctx *ctx)
 					(IR_BB_LOOP_HEADER|IR_BB_ENTRY)) {
 				bb->flags |= IR_BB_LOOP_WITH_ENTRY;
 			}
-			bb = &blocks[b];
-			if (ctx->entries_count
-			 && (bb->flags & (IR_BB_LOOP_HEADER|IR_BB_LOOP_WITH_ENTRY)) == IR_BB_LOOP_HEADER
-			 && (bb->predecessors_count > 2 || (bb->flags & IR_BB_IRREDUCIBLE_LOOP))) {
-				ir_check_loop_entry_in_preds(ctx, b, &work);
-			}
 		}
 	}