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

Unified Diff: src/compiler/representation-change.cc

Issue 2222983002: [turbofan] Also consume number type feedback for abstract equality. (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 | « src/compiler/representation-change.h ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/representation-change.cc
diff --git a/src/compiler/representation-change.cc b/src/compiler/representation-change.cc
index 4032df2d92d23b9c5f3cbcd8b0b3645fb9dab36e..7a150db371eb74ceacd221d51984490fcb309185 100644
--- a/src/compiler/representation-change.cc
+++ b/src/compiler/representation-change.cc
@@ -373,8 +373,13 @@ Node* RepresentationChanger::GetFloat64RepresentationFor(
} else if (output_type->Is(Type::NumberOrOddball())) {
// TODO(jarin) Here we should check that truncation is Number.
op = simplified()->TruncateTaggedToFloat64();
+ } else if (use_info.type_check() == TypeCheckKind::kNumber ||
+ (use_info.type_check() == TypeCheckKind::kNumberOrOddball &&
+ !output_type->Maybe(Type::BooleanOrNullOrNumber()))) {
+ op = simplified()->CheckedTaggedToFloat64(CheckTaggedInputMode::kNumber);
} else if (use_info.type_check() == TypeCheckKind::kNumberOrOddball) {
- op = simplified()->CheckedTaggedToFloat64();
+ op = simplified()->CheckedTaggedToFloat64(
+ CheckTaggedInputMode::kNumberOrOddball);
}
} else if (output_rep == MachineRepresentation::kFloat32) {
op = machine()->ChangeFloat32ToFloat64();
« no previous file with comments | « src/compiler/representation-change.h ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698