From 1ee71aa29cb8fb241574c408c0cf523ea6b87cce Mon Sep 17 00:00:00 2001 From: bmeurer Date: Wed, 22 Jun 2016 05:24:13 -0700 Subject: [PATCH] [turbofan] Fix bug in CheckTaggedSigned lowering. TBR=jarin@chromium.org Review-Url: https://codereview.chromium.org/2087803005 Cr-Commit-Position: refs/heads/master@{#37186} --- src/compiler/simplified-lowering.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc index 343282ffee..66792f162e 100644 --- a/src/compiler/simplified-lowering.cc +++ b/src/compiler/simplified-lowering.cc @@ -695,6 +695,7 @@ class RepresentationSelector { // In the change phase, insert a change before the use if necessary. if (use.representation() == MachineRepresentation::kNone) return; // No input requirement on the use. + DCHECK_NOT_NULL(input); NodeInfo* input_info = GetInfo(input); MachineRepresentation input_rep = input_info->representation(); if (input_rep != use.representation() || @@ -1678,7 +1679,7 @@ class RepresentationSelector { // TODO(jarin,bmeurer): Add CheckedSignedSmallAsWord32? VisitUnop(node, UseInfo::CheckedSigned32AsWord32(), MachineRepresentation::kWord32); - DeferReplacement(node, node->InputAt(0)); + if (lower()) DeferReplacement(node, node->InputAt(0)); } else { VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); if (lower()) {