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

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

Issue 2079233006: [turbofan] Propagate word32 truncations through tagged-hole checks. (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 | « no previous file | no next file » | 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 ac0f53af9d0c686483d3c8d2c4d77f4a6f9e6f0a..ee1d7b7a8132c693c30a87c226fc94970e95fed6 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -1860,9 +1860,18 @@ class RepresentationSelector {
return;
}
case IrOpcode::kCheckTaggedHole: {
- ProcessInput(node, 0, UseInfo::AnyTagged());
- ProcessRemainingInputs(node, 1);
- SetOutput(node, MachineRepresentation::kTagged);
+ CheckTaggedHoleMode mode = CheckTaggedHoleModeOf(node->op());
+ if (truncation.TruncatesToWord32() &&
+ mode == CheckTaggedHoleMode::kConvertHoleToUndefined) {
+ ProcessInput(node, 0, UseInfo::CheckedSigned32AsWord32());
+ ProcessRemainingInputs(node, 1);
+ SetOutput(node, MachineRepresentation::kWord32);
+ if (lower()) DeferReplacement(node, node->InputAt(0));
+ } else {
+ ProcessInput(node, 0, UseInfo::AnyTagged());
+ ProcessRemainingInputs(node, 1);
+ SetOutput(node, MachineRepresentation::kTagged);
+ }
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698