mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1089769: Emitted at uses instructions should be added to the MIR graph in redefine; r=nbp
This commit is contained in:
parent
f36293e337
commit
aef716e1d5
@ -212,17 +212,18 @@ LIRGeneratorShared::redefine(MDefinition *def, MDefinition *as)
|
||||
(def->type() == MIRType_Int32 || def->type() == MIRType_Boolean) &&
|
||||
(as->type() == MIRType_Int32 || as->type() == MIRType_Boolean))))
|
||||
{
|
||||
MDefinition *replacement;
|
||||
MInstruction *replacement;
|
||||
if (def->type() != as->type()) {
|
||||
Value v = as->toConstant()->value();
|
||||
if (as->type() == MIRType_Int32)
|
||||
replacement = MConstant::New(alloc(), BooleanValue(v.toInt32()));
|
||||
else
|
||||
replacement = MConstant::New(alloc(), Int32Value(v.toBoolean()));
|
||||
def->block()->insertBefore(def->toInstruction(), replacement);
|
||||
if (!emitAtUses(replacement->toInstruction()))
|
||||
return false;
|
||||
} else {
|
||||
replacement = as;
|
||||
replacement = as->toInstruction();
|
||||
}
|
||||
def->replaceAllUsesWith(replacement);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user