v8/test/mjsunit/compiler/regress-1302572.js
Nico Hartmann 87d73a3ae0 Reland "[turbofan] Enable --verify-simplified-lowering in debug"
This reverts commit aaedd8b788.

Changes in the reland:
The inital problem was caused by nodes that were removed during SL
because they are no-ops but have an effect on typing (in the repro, this
was e.g. PlainPrimitiveToNumber). The reland introdocues a new operator
SLVerifierHint that is used exclusively in SL to provide hints to the
verifier and that solves this problem. SLVerifierHint also replaces the
previous use of TypeGuard to type constant nodes for the verifier.

Bug: v8:12619, chromium:1302572
Change-Id: I0957645c03d8b7c26cd6d630a1ecbd0a6a8223ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3512574
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79564}
2022-03-23 09:33:11 +00:00

16 lines
381 B
JavaScript

// Copyright 2022 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
function foo(i) {
const b = i <= i;
return 0 + b;
}
%PrepareFunctionForOptimization(foo);
assertEquals(1, foo(5));
%OptimizeFunctionOnNextCall(foo);
assertEquals(1, foo(5));