mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 894582 - IonMonkey: Constant fold arithm operations with double output that fits in int32. r=jandem
This commit is contained in:
parent
9f146077b1
commit
0d2f2c46c9
@ -122,6 +122,11 @@ EvaluateConstantOperands(MBinaryInstruction *ins, bool *ptypeChange = NULL)
|
||||
MOZ_ASSUME_UNREACHABLE("NYI");
|
||||
}
|
||||
|
||||
// setNumber eagerly transforms a number to int32.
|
||||
// Transform back to double, if the output type is double.
|
||||
if (ins->type() == MIRType_Double && ret.isInt32())
|
||||
ret.setDouble(ret.toNumber());
|
||||
|
||||
if (ins->type() != MIRTypeFromValue(ret)) {
|
||||
if (ptypeChange)
|
||||
*ptypeChange = true;
|
||||
|
Loading…
Reference in New Issue
Block a user