fbd4541fe7
An Int32Constant might need to be tagged in Phi boundaries. This exposes the Graph's smi constants to frames state merger logic. Bug: v8:7700, chromium:1378814, chromium:1379571 Change-Id: Ib373b44a76324eeb23cf9fef4483f70160cd54b4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3993220 Auto-Submit: Victor Gomes <victorgomes@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Victor Gomes <victorgomes@chromium.org> Cr-Commit-Position: refs/heads/main@{#83993}
21 lines
398 B
JavaScript
21 lines
398 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 --maglev
|
|
|
|
function f(b, n) {
|
|
let a;
|
|
if (b) {
|
|
a = 2;
|
|
} else {
|
|
a = n%n;
|
|
}
|
|
return a;
|
|
}
|
|
|
|
%PrepareFunctionForOptimization(f);
|
|
f(false, 2);
|
|
%OptimizeMaglevOnNextCall(f);
|
|
f(false, 2);
|