backend/arm64/reg_alloc: Handle immediates in DefineAsExisting
This commit is contained in:
parent
277f7a76e9
commit
a5f3164c38
1 changed files with 5 additions and 0 deletions
|
@ -177,6 +177,11 @@ void RegAlloc::PrepareForCall(IR::Inst* result, std::optional<Argument::copyable
|
|||
}
|
||||
|
||||
void RegAlloc::DefineAsExisting(IR::Inst* inst, Argument& arg) {
|
||||
if (arg.value.IsImmediate()) {
|
||||
inst->ReplaceUsesWith(arg.value);
|
||||
return;
|
||||
}
|
||||
|
||||
ASSERT(!ValueLocation(inst));
|
||||
auto& info = ValueInfo(arg.value.GetInst());
|
||||
info.values.emplace_back(inst);
|
||||
|
|
Loading…
Reference in a new issue