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

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

Issue 2184513003: [turbofan] Adds handling of number or oddball type feedback to SpeculativeNumberShiftLeft. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index e7aaf43535a54e0bf27a1361265758a28c9d7532..1e54015335bf09ecbd304923a1837e347cdc6fc9 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -1667,22 +1667,15 @@ class RepresentationSelector {
}
BinaryOperationHints::Hint hint = BinaryOperationHintOf(node->op());
if (hint == BinaryOperationHints::kSignedSmall ||
- hint == BinaryOperationHints::kSigned32) {
+ hint == BinaryOperationHints::kSigned32 ||
Benedikt Meurer 2016/07/27 03:34:36 This if is redundant. Drop it completely, or phras
Jarin 2016/07/27 05:34:01 +1 for the DCHECK.
epertoso 2016/07/27 08:26:36 As per offline discussion, I'll just remove this.
+ hint == BinaryOperationHints::kNumberOrOddball) {
Type* rhs_type = GetUpperBound(node->InputAt(1));
- if (truncation.IsUsedAsWord32()) {
- VisitBinop(node, UseInfo::CheckedSigned32AsWord32(),
- MachineRepresentation::kWord32);
- if (lower()) {
- lowering->DoShift(node, lowering->machine()->Word32Shl(),
- rhs_type);
- }
- } else {
- VisitBinop(node, UseInfo::CheckedSigned32AsWord32(),
- MachineRepresentation::kWord32, Type::Signed32());
- if (lower()) {
- lowering->DoShift(node, lowering->machine()->Word32Shl(),
- rhs_type);
- }
+ VisitBinop(node, hint == BinaryOperationHints::kNumberOrOddball
+ ? UseInfo::CheckedNumberOrOddballAsWord32()
+ : UseInfo::CheckedSigned32AsWord32(),
+ MachineRepresentation::kWord32, Type::Signed32());
+ if (lower()) {
+ lowering->DoShift(node, lowering->machine()->Word32Shl(), rhs_type);
}
return;
}

Powered by Google App Engine
This is Rietveld 408576698