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

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

Issue 2115513002: [turbofan] Introduce CheckIf simplified operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/redundancy-elimination.cc ('k') | src/compiler/simplified-operator.h » ('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 a6717fb1001847a1585e96c3119bcc3132201442..1313366d27173a0caa6571a18f6c64fdb417a1d1 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -1692,14 +1692,24 @@ class RepresentationSelector {
UseInfo::TruncatingWord32(), MachineRepresentation::kWord32);
return;
}
+ case IrOpcode::kCheckIf: {
+ ProcessInput(node, 0, UseInfo::Bool());
+ ProcessRemainingInputs(node, 1);
+ SetOutput(node, MachineRepresentation::kNone);
+ return;
+ }
case IrOpcode::kCheckNumber: {
if (InputIs(node, Type::Number())) {
if (truncation.TruncatesToWord32()) {
VisitUnop(node, UseInfo::TruncatingWord32(),
MachineRepresentation::kWord32);
} else {
- VisitUnop(node, UseInfo::TruncatingFloat64(),
- MachineRepresentation::kFloat64);
+ // TODO(jarin,bmeurer): We need to go to Tagged here, because
+ // otherwise we cannot distinguish the hole NaN (which might need to
+ // be treated as undefined). We should have a dedicated Type for
+ // that at some point, and maybe even a dedicated truncation.
+ VisitUnop(node, UseInfo::AnyTagged(),
+ MachineRepresentation::kTagged);
}
if (lower()) DeferReplacement(node, node->InputAt(0));
} else {
« no previous file with comments | « src/compiler/redundancy-elimination.cc ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698