Fix register allocator with STORE_LOCAL. May indicate redundant stores.
This commit is contained in:
parent
2854841753
commit
810c256f21
|
@ -112,9 +112,11 @@ int RegisterAllocationPass::Run(HIRBuilder* builder) {
|
||||||
if (!instr->src1_use->next) {
|
if (!instr->src1_use->next) {
|
||||||
// Pull off preferred register. We will try to reuse this for the
|
// Pull off preferred register. We will try to reuse this for the
|
||||||
// dest.
|
// dest.
|
||||||
has_preferred_reg = true;
|
// NOTE: set may be null if this is a store local.
|
||||||
preferred_reg = instr->src1.value->reg;
|
if (preferred_reg.set) {
|
||||||
assert_not_null(preferred_reg.set);
|
has_preferred_reg = true;
|
||||||
|
preferred_reg = instr->src1.value->reg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue