mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 864402 - OdinMonkey: int MAdd/MMul should be marked commutative (r=sstangl)
--HG-- extra : rebase_source : 53a771c126bfa101f6b7b5b75c81ce22666728da
This commit is contained in:
parent
da79205d6c
commit
de5a7249f9
@ -3028,8 +3028,10 @@ class MAdd : public MBinaryArithInstruction
|
||||
MAdd *add = new MAdd(left, right);
|
||||
add->specialization_ = type;
|
||||
add->setResultType(type);
|
||||
if (type == MIRType_Int32)
|
||||
if (type == MIRType_Int32) {
|
||||
add->setTruncated(true);
|
||||
add->setCommutative();
|
||||
}
|
||||
return add;
|
||||
}
|
||||
void analyzeTruncateBackward();
|
||||
@ -3101,6 +3103,7 @@ class MMul : public MBinaryArithInstruction
|
||||
// can never fail and always truncates its output to int32.
|
||||
canBeNegativeZero_ = false;
|
||||
setTruncated(true);
|
||||
setCommutative();
|
||||
}
|
||||
JS_ASSERT_IF(mode != Integer, mode == Normal);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user