Bug 792234 - Remove erroneous folding for MDiv. r=dvander

This commit is contained in:
Sean Stangl 2012-09-18 15:31:58 -07:00
parent 0ebf25f2e4
commit 8c59e4e259
2 changed files with 7 additions and 5 deletions

View File

@ -694,11 +694,6 @@ MDiv::foldsTo(bool useValueNumbers)
if (MDefinition *folded = EvaluateConstantOperands(this))
return folded;
// 0 / x -> 0
// x / 1 -> x
if (IsConstant(lhs(), 0) || IsConstant(rhs(), 1))
return lhs();
return this;
}

View File

@ -0,0 +1,7 @@
function foo() {
return '' / undefined;
}
foo();
assertEq(foo(), NaN);