v8/test/mjsunit/compiler/regress-935092.js
Jaroslav Sevcik ac8e98e404 [turbofan] Check for dead control in branch elimination.
If the branch associated with the condition is kDead, the current
node will be killed anyway, so let us just survive the lowering.

Bug: chromium:935092
Change-Id: If7b39e3b5452d6c9bc5199080eb38725e6c4eab5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1488769
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60143}
2019-03-11 06:30:00 +00:00

19 lines
447 B
JavaScript

// Copyright 2019 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 opt(g) {
for (var X = 0; X < 1; X++) {
(new(function() {
this.y
})).x;
(g || (g && (((g || -N)(g && 0))))).y = 0
}
(function() { g })
}
opt({});
%OptimizeFunctionOnNextCall(opt);
opt({});