ArithSub over Int52 has shouldCheckOverflow as always true
authorsbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Apr 2019 01:31:51 +0000 (01:31 +0000)
committersbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Apr 2019 01:31:51 +0000 (01:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196796

Reviewed by Yusuke Suzuki.

AI was checking for ArithSub over Int52 if !shouldCheckOverflow. However,
shouldCheckOverflow is always true, so !shouldCheckOverflow is always
false. We shouldn't check something we assert against.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244178 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h

index 365e1d2..82144df 100644 (file)
@@ -1,3 +1,17 @@
+2019-04-10  Saam Barati  <sbarati@apple.com>
+
+        ArithSub over Int52 has shouldCheckOverflow as always true
+        https://bugs.webkit.org/show_bug.cgi?id=196796
+
+        Reviewed by Yusuke Suzuki.
+
+        AI was checking for ArithSub over Int52 if !shouldCheckOverflow. However,
+        shouldCheckOverflow is always true, so !shouldCheckOverflow is always
+        false. We shouldn't check something we assert against.
+
+        * dfg/DFGAbstractInterpreterInlines.h:
+        (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
+
 2019-04-10  Basuke Suzuki  <basuke.suzuki@sony.com>
 
         [PlayStation] Specify byte order clearly on Remote Inspector Protocol
index 46a533a..f33dc11 100644 (file)
@@ -763,7 +763,7 @@ bool AbstractInterpreter<AbstractStateType>::executeEffects(unsigned clobberLimi
         case Int52RepUse:
             if (left && right && left.isAnyInt() && right.isAnyInt()) {
                 JSValue result = jsNumber(left.asAnyInt() - right.asAnyInt());
-                if (result.isAnyInt() || !shouldCheckOverflow(node->arithMode())) {
+                if (result.isAnyInt()) {
                     setConstant(node, result);
                     break;
                 }