mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 889186: IonMonkey: When optimizing a compare mark replaced operands correspondingly as being folded, r=bhackett
This commit is contained in:
parent
07d9a40564
commit
c52be22933
@ -1565,10 +1565,14 @@ MCompare::infer(JSContext *cx, BaselineInspector *inspector, jsbytecode *pc)
|
||||
// now unwrapped operand is an int32.
|
||||
MDefinition *newlhs, *newrhs;
|
||||
if (MustBeUInt32(getOperand(0), &newlhs) && MustBeUInt32(getOperand(1), &newrhs)) {
|
||||
if (newlhs != getOperand(0))
|
||||
if (newlhs != getOperand(0)) {
|
||||
getOperand(0)->setFoldedUnchecked();
|
||||
replaceOperand(0, newlhs);
|
||||
if (newrhs != getOperand(1))
|
||||
}
|
||||
if (newrhs != getOperand(1)) {
|
||||
getOperand(1)->setFoldedUnchecked();
|
||||
replaceOperand(1, newrhs);
|
||||
}
|
||||
compareType_ = Compare_UInt32;
|
||||
return;
|
||||
}
|
||||
|
6
js/src/jit-test/tests/ion/bug889186.js
Normal file
6
js/src/jit-test/tests/ion/bug889186.js
Normal file
@ -0,0 +1,6 @@
|
||||
function f()
|
||||
{
|
||||
return (4 >>> 0) > ((0 % (1 == 2)) >>> 0);
|
||||
}
|
||||
assertEq(f(), true);
|
||||
assertEq(f(), true);
|
Loading…
Reference in New Issue
Block a user