Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Unified Diff: src/compiler/simplified-lowering.cc

Issue 2431233003: [turbofan] Also remove minus zero check for rhs of CheckedInt32Add. (Closed)
Patch Set: Update comment. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index 2cc6ff6d9375e16c4ce48b40f04ed564cba4d3ac..3acefdf163c029692ef2b413b34c16b3ecdc6c57 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -1149,12 +1149,12 @@ class RepresentationSelector {
if (hint == NumberOperationHint::kSignedSmall ||
hint == NumberOperationHint::kSigned32) {
UseInfo left_use = CheckedUseInfoAsWord32FromHint(hint);
- // For subtraction, the right hand side can be minus zero without
- // resulting in minus zero, so we skip the check for it.
+ // For CheckedInt32Add and CheckedInt32Sub, we don't need to do
+ // a minus zero check for the right hand side, since we already
+ // know that the left hand side is a proper Signed32 value,
+ // potentially guarded by a check.
UseInfo right_use = CheckedUseInfoAsWord32FromHint(
- hint, node->opcode() == IrOpcode::kSpeculativeNumberSubtract
- ? CheckForMinusZeroMode::kDontCheckForMinusZero
- : CheckForMinusZeroMode::kCheckForMinusZero);
+ hint, CheckForMinusZeroMode::kDontCheckForMinusZero);
VisitBinop(node, left_use, right_use, MachineRepresentation::kWord32,
Type::Signed32());
if (lower()) ChangeToInt32OverflowOp(node);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698