[turbofan] add regression test for chromium:796041
The missing regression test for https://chromium-review.googlesource.com/c/v8/v8/+/847011 Bug: chromium:796041 Change-Id: I3d791d6485221d2fa68def2c7be96c48822aa651 Reviewed-on: https://chromium-review.googlesource.com/848995 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#50349}
This commit is contained in:
parent
1685b5d27a
commit
dbc377ed8e
35
test/mjsunit/compiler/regress-796041.js
Normal file
35
test/mjsunit/compiler/regress-796041.js
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// Copyright 2018 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
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function f(abort, n, a, b) {
|
||||||
|
if (abort) return;
|
||||||
|
var x = a ? true : "" + a;
|
||||||
|
if (!a) {
|
||||||
|
var dead = n + 1 + 1;
|
||||||
|
if(!b) {
|
||||||
|
x = dead;
|
||||||
|
}
|
||||||
|
if (x) {
|
||||||
|
x = false;
|
||||||
|
}
|
||||||
|
if (b) {
|
||||||
|
x = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return x + 1;
|
||||||
|
}
|
||||||
|
f(false, 5); f(false, 6); f(false, 7); f(false, 8);
|
||||||
|
|
||||||
|
function g(abort, a, b) {
|
||||||
|
return f(abort, "abc", a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
g(true); g(true); g(true); g(true);
|
||||||
|
|
||||||
|
%OptimizeFunctionOnNextCall(g);
|
||||||
|
g(false);
|
Loading…
Reference in New Issue
Block a user