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.
|
||||||
|
// NOTE: set may be null if this is a store local.
|
||||||
|
if (preferred_reg.set) {
|
||||||
has_preferred_reg = true;
|
has_preferred_reg = true;
|
||||||
preferred_reg = instr->src1.value->reg;
|
preferred_reg = instr->src1.value->reg;
|
||||||
assert_not_null(preferred_reg.set);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue