Title: [276525] branches/safari-611-branch/Source/_javascript_Core
Revision
276525
Author
[email protected]
Date
2021-04-23 15:46:21 -0700 (Fri, 23 Apr 2021)

Log Message

Cherry-pick r276524. rdar://problem/77089783

    Fix B3 strength reduction for shl.
    https://bugs.webkit.org/show_bug.cgi?id=224913
    rdar://76978874

    Reviewed by Michael Saboff.

    If the operation can potentially either underflow or overflow, then the result
    can be any value.

    * b3/B3ReduceStrength.cpp:

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

Modified Paths

Diff

Modified: branches/safari-611-branch/Source/_javascript_Core/ChangeLog (276524 => 276525)


--- branches/safari-611-branch/Source/_javascript_Core/ChangeLog	2021-04-23 22:14:11 UTC (rev 276524)
+++ branches/safari-611-branch/Source/_javascript_Core/ChangeLog	2021-04-23 22:46:21 UTC (rev 276525)
@@ -1,3 +1,35 @@
+2021-04-23  Ruben Turcios  <[email protected]>
+
+        Cherry-pick r276524. rdar://problem/77089783
+
+    Fix B3 strength reduction for shl.
+    https://bugs.webkit.org/show_bug.cgi?id=224913
+    rdar://76978874
+    
+    Reviewed by Michael Saboff.
+    
+    If the operation can potentially either underflow or overflow, then the result
+    can be any value.
+    
+    * b3/B3ReduceStrength.cpp:
+    
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-04-23  Mark Lam  <[email protected]>
+
+            Fix B3 strength reduction for shl.
+            https://bugs.webkit.org/show_bug.cgi?id=224913
+            rdar://76978874
+
+            Reviewed by Michael Saboff.
+
+            If the operation can potentially either underflow or overflow, then the result
+            can be any value.
+
+            * b3/B3ReduceStrength.cpp:
+
 2021-04-23  Russell Epstein  <[email protected]>
 
         Cherry-pick r276324. rdar://problem/77086404

Modified: branches/safari-611-branch/Source/_javascript_Core/b3/B3ReduceStrength.cpp (276524 => 276525)


--- branches/safari-611-branch/Source/_javascript_Core/b3/B3ReduceStrength.cpp	2021-04-23 22:14:11 UTC (rev 276524)
+++ branches/safari-611-branch/Source/_javascript_Core/b3/B3ReduceStrength.cpp	2021-04-23 22:46:21 UTC (rev 276525)
@@ -240,10 +240,11 @@
         T newMin = static_cast<T>(m_min) << static_cast<T>(shiftAmount);
         T newMax = static_cast<T>(m_max) << static_cast<T>(shiftAmount);
 
-        if ((newMin >> shiftAmount) != static_cast<T>(m_min))
+        if (((newMin >> shiftAmount) != static_cast<T>(m_min))
+            || ((newMax >> shiftAmount) != static_cast<T>(m_max))) {
             newMin = std::numeric_limits<T>::min();
-        if ((newMax >> shiftAmount) != static_cast<T>(m_max))
             newMax = std::numeric_limits<T>::max();
+        }
 
         return IntRange(newMin, newMax);
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to