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

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

Issue 2206553002: [turbofan] Fix invalid representation selection for Phis/Selects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/regress/regress-v8-5255-1.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 bc1721e88d173d9af5661f5def7b039ec80bd5dc..927f3edd842e2101b7edb0dbe5a18a001375412d 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -839,11 +839,11 @@ class RepresentationSelector {
return MachineRepresentation::kNone;
} else if (type->Is(Type::Signed32()) || type->Is(Type::Unsigned32())) {
return MachineRepresentation::kWord32;
- } else if (use.IsUsedAsWord32()) {
+ } else if (type->Is(Type::NumberOrOddball()) && use.IsUsedAsWord32()) {
return MachineRepresentation::kWord32;
} else if (type->Is(Type::Boolean())) {
return MachineRepresentation::kBit;
- } else if (use.IsUsedAsFloat64()) {
+ } else if (type->Is(Type::NumberOrOddball()) && use.IsUsedAsFloat64()) {
return MachineRepresentation::kFloat64;
} else if (type->Is(
Type::Union(Type::SignedSmall(), Type::NaN(), zone()))) {
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-v8-5255-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698