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

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: Update. 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
« no previous file with comments | « src/compiler/representation-change.cc ('k') | test/mjsunit/compiler/turbo-number-feedback.js » ('j') | 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 924a319f917bf2f86340db0db88c4e6f78717306..09a157f93564319d04276a671dfa0cf7759e6434 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -1666,27 +1666,15 @@ class RepresentationSelector {
return;
}
BinaryOperationHints::Hint hint = BinaryOperationHintOf(node->op());
- if (hint == BinaryOperationHints::kSignedSmall ||
- hint == BinaryOperationHints::kSigned32) {
- 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);
- }
- }
- return;
+ Type* rhs_type = GetUpperBound(node->InputAt(1));
+ VisitBinop(node, hint == BinaryOperationHints::kNumberOrOddball
+ ? UseInfo::CheckedNumberOrOddballAsWord32()
+ : UseInfo::CheckedSigned32AsWord32(),
+ MachineRepresentation::kWord32, Type::Signed32());
+ if (lower()) {
+ lowering->DoShift(node, lowering->machine()->Word32Shl(), rhs_type);
}
- UNREACHABLE();
+ return;
}
case IrOpcode::kNumberShiftRight: {
Type* rhs_type = GetUpperBound(node->InputAt(1));
« no previous file with comments | « src/compiler/representation-change.cc ('k') | test/mjsunit/compiler/turbo-number-feedback.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698