Skip to content

Commit 8a04d39

Browse files
committed
Skip life range with LOAD and single use
1 parent 9ddf9ac commit 8a04d39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/opcache/jit/zend_jit_trace.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2094,6 +2094,12 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace
20942094
for (i = 0; i < ssa->vars_count; i++) {
20952095
if (start[i] >= 0 && end[i] >= 0) {
20962096
ZEND_ASSERT(j < count);
2097+
if ((flags[i] & ZREG_LOAD) &&
2098+
(flags[i] & ZREG_LAST_USE) &&
2099+
end[i] == ssa->vars[i].use_chain) {
2100+
/* skip life range with single use */
2101+
continue;
2102+
}
20972103
intervals[i] = &list[j];
20982104
list[j].ssa_var = i;
20992105
list[j].reg = ZREG_NONE;

0 commit comments

Comments
 (0)