Commit f2a0f53c authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm] Fix Liftoff bailout

The bailout was guarded by the "if (counters)" condition, which does not
make sense.
If Liftoff compilation is executed for debugging, no counters will be
passed. On platforms that do not implement Liftoff, we still need to
bail out correctly.

R=ahaas@chromium.org

Bug: v8:10147
Change-Id: I188460183bb1c376d456e0d4e54e2338f4a66e23
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2105353
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66725}
parent 38fa16f8
......@@ -2945,14 +2945,14 @@ WasmCompilationResult ExecuteLiftoffCompilation(
counters->liftoff_bailout_reasons()->AddSample(
static_cast<int>(compiler->bailout_reason()));
if (compiler->did_bailout()) {
// Liftoff compilation failed.
counters->liftoff_unsupported_functions()->Increment();
return WasmCompilationResult{};
} else {
counters->liftoff_compiled_functions()->Increment();
}
counters->liftoff_compiled_functions()->Increment();
}
if (compiler->did_bailout()) return WasmCompilationResult{};
WasmCompilationResult result;
compiler->GetCode(&result.code_desc);
result.instr_buffer = instruction_buffer->ReleaseBuffer();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment