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

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

Issue 968913002: [turbofan] Take type into account when determining Word32 phi representation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | test/mjsunit/mjsunit.status » ('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 b3050719883c0467bf97f8d0610e494a3142c014..5a3488c78df7b77a2b2ea8d117f8d4418f907a1a 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -324,7 +324,8 @@ class RepresentationSelector {
} else if (upper->Is(Type::Signed32()) || upper->Is(Type::Unsigned32())) {
// multiple uses, but we are within 32 bits range => pick kRepWord32.
return kRepWord32;
- } else if ((use & kRepMask) == kRepWord32 ||
+ } else if (((use & kRepMask) == kRepWord32 &&
+ !CanObserveNonWord32(use)) ||
(use & kTypeMask) == kTypeInt32 ||
(use & kTypeMask) == kTypeUint32) {
// We only use 32 bits or we use the result consistently.
@@ -451,6 +452,10 @@ class RepresentationSelector {
!CanObserveNonUint32(use);
}
+ bool CanObserveNonWord32(MachineTypeUnion use) {
+ return (use & (kTypeNumber | kTypeAny)) != 0;
Benedikt Meurer 2015/03/02 18:08:58 Can we use the inverse, i.e. check against ~(kType
Jarin 2015/03/03 08:57:23 Done.
+ }
+
bool CanObserveNonInt32(MachineTypeUnion use) {
return (use & (kTypeUint32 | kTypeNumber | kTypeAny)) != 0;
}
« no previous file with comments | « no previous file | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698