[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:
parent
b15f8710c6
commit
21d55e2166
@ -1394,8 +1394,7 @@ class RepresentationSelector {
|
|||||||
node->AppendInput(jsgraph_->zone(), jsgraph_->Int32Constant(0));
|
node->AppendInput(jsgraph_->zone(), jsgraph_->Int32Constant(0));
|
||||||
NodeProperties::ChangeOp(node, lowering->machine()->Word32Equal());
|
NodeProperties::ChangeOp(node, lowering->machine()->Word32Equal());
|
||||||
} else {
|
} else {
|
||||||
DCHECK_EQ(input_info->representation(),
|
DCHECK(CanBeTaggedPointer(input_info->representation()));
|
||||||
MachineRepresentation::kTagged);
|
|
||||||
// BooleanNot(x: kRepTagged) => WordEqual(x, #false)
|
// BooleanNot(x: kRepTagged) => WordEqual(x, #false)
|
||||||
node->AppendInput(jsgraph_->zone(), jsgraph_->FalseConstant());
|
node->AppendInput(jsgraph_->zone(), jsgraph_->FalseConstant());
|
||||||
NodeProperties::ChangeOp(node, lowering->machine()->WordEqual());
|
NodeProperties::ChangeOp(node, lowering->machine()->WordEqual());
|
||||||
|
15
test/mjsunit/compiler/regress-v8-5573.js
Normal file
15
test/mjsunit/compiler/regress-v8-5573.js
Normal 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());
|
Loading…
Reference in New Issue
Block a user