[turbofan] Relax a too-strict dcheck.

BUG=v8:5573

Review-Url: https://codereview.chromium.org/2458623002
Cr-Commit-Position: refs/heads/master@{#40619}
This commit is contained in:
jarin 2016-10-27 05:32:37 -07:00 committed by Commit bot
parent b15f8710c6
commit 21d55e2166
2 changed files with 16 additions and 2 deletions

View File

@ -1394,8 +1394,7 @@ class RepresentationSelector {
node->AppendInput(jsgraph_->zone(), jsgraph_->Int32Constant(0));
NodeProperties::ChangeOp(node, lowering->machine()->Word32Equal());
} else {
DCHECK_EQ(input_info->representation(),
MachineRepresentation::kTagged);
DCHECK(CanBeTaggedPointer(input_info->representation()));
// BooleanNot(x: kRepTagged) => WordEqual(x, #false)
node->AppendInput(jsgraph_->zone(), jsgraph_->FalseConstant());
NodeProperties::ChangeOp(node, lowering->machine()->WordEqual());

View File

@ -0,0 +1,15 @@
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
var global = true;
global = false;
function f() {
return !global;
}
%OptimizeFunctionOnNextCall(f);
assertTrue(f());