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

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: Address review comments 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..6f3d835ff6e9906a7cc5930a7f26840721a5bb84 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 & ~(kTypeUint32 | kTypeInt32)) != 0;
+ }
+
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