Changeset 276524 in webkit
- Timestamp:
- Apr 23, 2021, 3:14:11 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
b3/B3ReduceStrength.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r276516 r276524 1 2021-04-23 Mark Lam <mark.lam@apple.com> 2 3 Fix B3 strength reduction for shl. 4 https://bugs.webkit.org/show_bug.cgi?id=224913 5 rdar://76978874 6 7 Reviewed by Michael Saboff. 8 9 If the operation can potentially either underflow or overflow, then the result 10 can be any value. 11 12 * b3/B3ReduceStrength.cpp: 13 1 14 2021-04-23 Fujii Hironori <Hironori.Fujii@sony.com> 2 15 -
trunk/Source/JavaScriptCore/b3/B3ReduceStrength.cpp
r275800 r276524 241 241 T newMax = static_cast<T>(m_max) << static_cast<T>(shiftAmount); 242 242 243 if ((newMin >> shiftAmount) != static_cast<T>(m_min)) 243 if (((newMin >> shiftAmount) != static_cast<T>(m_min)) 244 || ((newMax >> shiftAmount) != static_cast<T>(m_max))) { 244 245 newMin = std::numeric_limits<T>::min(); 245 if ((newMax >> shiftAmount) != static_cast<T>(m_max))246 246 newMax = std::numeric_limits<T>::max(); 247 } 247 248 248 249 return IntRange(newMin, newMax);
Note:
See TracChangeset
for help on using the changeset viewer.