c0956fbd1d
- Use the lowered 32-bit signature when linking the inlined and caller graphs. - Tolerate non-projection uses of Call nodes when linking the graphs. These can be left over by Int64Lowering. - Drive-by: Inline really small functions even if their call count is low. Bug: v8:12166 Change-Id: I5b472d3f617f2f23820a5d142102c0a6c5c769dc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3720715 Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#81386}
34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
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: --no-liftoff --wasm-inlining
|
|
|
|
// This tests that inlining tolerates multi-return call uses that are not
|
|
// projections after Int64Lowering.
|
|
|
|
d8.file.execute("test/mjsunit/wasm/wasm-module-builder.js");
|
|
|
|
let builder = new WasmModuleBuilder();
|
|
|
|
let callee1 = builder.addFunction("callee1", kSig_l_l)
|
|
.addBody([kExprLocalGet, 0, kExprI64Const, 1, kExprI64Add]);
|
|
|
|
let callee2 = builder.addFunction("callee2", kSig_l_l)
|
|
.addBody([kExprLocalGet, 0, kExprI64Const, 1, kExprI64Sub]);
|
|
|
|
builder.addFunction("caller", kSig_l_l)
|
|
.addBody([kExprLocalGet, 0,
|
|
kExprI64Const, 0,
|
|
kExprI64GtS,
|
|
kExprIf, kWasmI64,
|
|
kExprLocalGet, 0, kExprCallFunction, 0,
|
|
kExprElse,
|
|
kExprLocalGet, 0, kExprCallFunction, 1,
|
|
kExprEnd])
|
|
.exportFunc();
|
|
|
|
let instance = builder.instantiate();
|
|
assertEquals(5n, instance.exports.caller(4n));
|
|
assertEquals(-9n, instance.exports.caller(-8n));
|