Changeset 283300 in webkit
- Timestamp:
- Sep 29, 2021, 10:27:45 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/dfg-strength-reduction-on-mod-should-handle-INT_MIN.js (added)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r283293 r283300 1 2021-09-29 Mark Lam <mark.lam@apple.com> 2 3 DFG strength reduction on % operator should handle an INT_MIN divisor. 4 https://bugs.webkit.org/show_bug.cgi?id=230391 5 <rdar://problem/83229740> 6 7 Reviewed by Robin Morisset. 8 9 * stress/dfg-strength-reduction-on-mod-should-handle-INT_MIN.js: Added. 10 1 11 2021-09-29 Saam Barati <sbarati@apple.com> 2 12 -
trunk/Source/JavaScriptCore/ChangeLog
r283293 r283300 1 2021-09-29 Mark Lam <mark.lam@apple.com> 2 3 DFG strength reduction on % operator should handle an INT_MIN divisor. 4 https://bugs.webkit.org/show_bug.cgi?id=230391 5 <rdar://problem/83229740> 6 7 Reviewed by Robin Morisset. 8 9 * dfg/DFGStrengthReductionPhase.cpp: 10 (JSC::DFG::StrengthReductionPhase::handleNode): 11 1 12 2021-09-29 Saam Barati <sbarati@apple.com> 2 13 -
trunk/Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp
r283232 r283300 1 1 /* 2 * Copyright (C) 2013-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2013-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 198 198 && m_node->child1()->op() == ArithMod 199 199 && m_node->child1()->binaryUseKind() == Int32Use 200 && m_node->child1()->child2()->isInt32Constant() 201 && std::abs(m_node->child1()->child2()->asInt32()) <= std::abs(m_node->child2()->asInt32())) { 200 && m_node->child1()->child2()->isInt32Constant()) { 201 202 int32_t const1 = m_node->child1()->child2()->asInt32(); 203 int32_t const2 = m_node->child2()->asInt32(); 204 205 if (const1 == INT_MIN || const2 == INT_MIN) 206 break; // std::abs(INT_MIN) is undefined. 207 208 if (std::abs(const1) <= std::abs(const2)) 202 209 convertToIdentityOverChild1(); 203 210 }
Note:
See TracChangeset
for help on using the changeset viewer.