<rdar://problem/21003555> cloberrize() is wrong for ArithRound because it doesn't...
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 May 2015 03:39:14 +0000 (03:39 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 May 2015 03:39:14 +0000 (03:39 +0000)
commitc1c759e17316930bcb936de56c4eb4c9bae43756
tree5e8a19762d5055f00719a3f4a929751747000aac
parentcb13bdca1f000643d947fce50ef4988b030eebe8
<rdar://problem/21003555> cloberrize() is wrong for ArithRound because it doesn't account for the arith mode
https://bugs.webkit.org/show_bug.cgi?id=145147

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-05-18
Reviewed by Filip Pizlo.

Really stupid bug: ArithRound nodes with different rounding modes
were not distinguished and CSE would happily unify with a node of
a different rounding mode.

DFG::clobberize() already support additional data but I was not using it.

* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* tests/stress/math-round-arith-rounding-mode.js: Added.
(firstCareAboutZeroSecondDoesNot):
(firstDoNotCareAboutZeroSecondDoes):
(warmup):
(verifyNegativeZeroIsPreserved):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGClobberize.h
Source/JavaScriptCore/tests/stress/math-round-arith-rounding-mode.js [new file with mode: 0644]