mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 792234 - Remove erroneous folding for MDiv. r=dvander
This commit is contained in:
parent
0ebf25f2e4
commit
8c59e4e259
@ -694,11 +694,6 @@ MDiv::foldsTo(bool useValueNumbers)
|
|||||||
if (MDefinition *folded = EvaluateConstantOperands(this))
|
if (MDefinition *folded = EvaluateConstantOperands(this))
|
||||||
return folded;
|
return folded;
|
||||||
|
|
||||||
// 0 / x -> 0
|
|
||||||
// x / 1 -> x
|
|
||||||
if (IsConstant(lhs(), 0) || IsConstant(rhs(), 1))
|
|
||||||
return lhs();
|
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
7
js/src/jit-test/tests/ion/bug792234.js
Normal file
7
js/src/jit-test/tests/ion/bug792234.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
function foo() {
|
||||||
|
return '' / undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
foo();
|
||||||
|
assertEq(foo(), NaN);
|
Loading…
Reference in New Issue
Block a user