Commit 26eeacb7 authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[compiler] Compute dominator tree for tests

The dominator tree is usually computed as part of scheduling (in
{Scheduler::ComputeSchedule}). For tests it was missing, leading to
DCHECK errors in the mid-tier register allocator, which uses the
dominator tree.

R=mslekova@chromium.org

Bug: v8:12330
Change-Id: I02bc8dee3aecb6a1613fa1d07d3aae85cd28de17
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3245114Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77543}
parent 2404758e
......@@ -95,6 +95,7 @@ Schedule* RawMachineAssembler::ExportForTest() {
}
schedule_->EnsureCFGWellFormedness();
Scheduler::ComputeSpecialRPO(zone(), schedule_);
Scheduler::GenerateDominatorTree(schedule_);
schedule_->PropagateDeferredMark();
if (FLAG_trace_turbo_scheduler) {
PrintF("--- EDGE SPLIT AND PROPAGATED DEFERRED SCHEDULE ------------\n");
......
......@@ -18,6 +18,7 @@
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/codegen-tester.h"
#include "test/cctest/compiler/value-helper.h"
#include "test/common/flag-utils.h"
namespace v8 {
namespace internal {
......@@ -7297,6 +7298,18 @@ TEST(Regression738952) {
CHECK_EQ(sentinel, m.Call());
}
#if V8_TARGET_ARCH_64_BIT
TEST(Regression12330) {
FLAG_SCOPE(turbo_force_mid_tier_regalloc);
RawMachineAssemblerTester<int32_t> m(MachineType::Int64());
Node* add = m.Int64SubWithOverflow(m.Int64Constant(0), m.Parameter(0));
Node* ovf = m.Projection(1, add);
m.Return(ovf);
m.GenerateCode();
}
#endif // V8_TARGET_ARCH_64_BIT
} // namespace compiler
} // namespace internal
} // namespace v8
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