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

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

Issue 1140933002: [turbofan] Lower more number operations to integer operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 39246df24609db6d039b5a78459cf5a97662b701..050d6ce0873211d55f179b50b1f4c1e88ef39b67 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -444,7 +444,9 @@ class RepresentationSelector {
}
bool CanLowerToInt32Binop(Node* node, MachineTypeUnion use) {
- return BothInputsAre(node, Type::Signed32()) && !CanObserveNonInt32(use);
+ return BothInputsAre(node, Type::Signed32()) &&
+ (!CanObserveNonInt32(use) ||
+ NodeProperties::GetBounds(node).upper->Is(Type::Signed32()));
}
bool CanLowerToInt32AdditiveBinop(Node* node, MachineTypeUnion use) {
@@ -453,7 +455,9 @@ class RepresentationSelector {
}
bool CanLowerToUint32Binop(Node* node, MachineTypeUnion use) {
- return BothInputsAre(node, Type::Unsigned32()) && !CanObserveNonUint32(use);
+ return BothInputsAre(node, Type::Unsigned32()) &&
+ (!CanObserveNonUint32(use) ||
+ NodeProperties::GetBounds(node).upper->Is(Type::Unsigned32()));
}
bool CanLowerToUint32AdditiveBinop(Node* node, MachineTypeUnion use) {
« 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