Title: [276537] branches/safari-611.1.21.161-branch/Source/_javascript_Core
Revision
276537
Author
[email protected]
Date
2021-04-23 17:21:10 -0700 (Fri, 23 Apr 2021)

Log Message

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

    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.1.21.161-branch/Source/_javascript_Core/ChangeLog (276536 => 276537)


--- branches/safari-611.1.21.161-branch/Source/_javascript_Core/ChangeLog	2021-04-24 00:18:32 UTC (rev 276536)
+++ branches/safari-611.1.21.161-branch/Source/_javascript_Core/ChangeLog	2021-04-24 00:21:10 UTC (rev 276537)
@@ -1,3 +1,35 @@
+2021-04-23  Alan Coon  <[email protected]>
+
+        Cherry-pick r276524. rdar://problem/77092702
+
+    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-02-17  Ruben Turcios  <[email protected]>
 
         Cherry-pick r271767. rdar://problem/74409412

Modified: branches/safari-611.1.21.161-branch/Source/_javascript_Core/b3/B3ReduceStrength.cpp (276536 => 276537)


--- branches/safari-611.1.21.161-branch/Source/_javascript_Core/b3/B3ReduceStrength.cpp	2021-04-24 00:18:32 UTC (rev 276536)
+++ branches/safari-611.1.21.161-branch/Source/_javascript_Core/b3/B3ReduceStrength.cpp	2021-04-24 00:21:10 UTC (rev 276537)
@@ -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