mirror of
https://github.com/danog/ir.git
synced 2025-01-22 05:31:32 +01:00
Fix SCCP problems
This commit is contained in:
parent
75ce65ce65
commit
14ffff68dc
@ -442,7 +442,7 @@ int ir_sccp(ir_ctx *ctx)
|
||||
_values[i+j+1].optx = IR_BOTTOM; /* keep the tail of a long multislot instruction */
|
||||
}
|
||||
}
|
||||
for (j = 1; j <= n; j++) {
|
||||
for (j = 1; j < n; j++) {
|
||||
if (merge_insn->ops[j] && IR_IS_REACHABLE(merge_insn->ops[j])) {
|
||||
if (ir_sccp_join_values(ctx, _values, i, insn->ops[j + 1])) {
|
||||
changed = 1;
|
||||
@ -462,6 +462,9 @@ int ir_sccp(ir_ctx *ctx)
|
||||
// } else
|
||||
if (IR_IS_TOP(insn->ops[j])) {
|
||||
has_top = 1;
|
||||
if (!ir_bitqueue_in(&worklist, insn->ops[j])) {
|
||||
ir_bitqueue_add(&worklist, insn->ops[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (has_top) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user