Commit d792c273 authored by Tobias Tebbi's avatar Tobias Tebbi Committed by V8 LUCI CQ

[turboshaft] fix single-block loop bug

Bug: v8:12783
Change-Id: Ia4aaf245428dd63be09a33bfb684f0573f6b9296
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3913084Reviewed-by: 's avatarManos Koukoutos <manoskouk@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83420}
parent f21ae185
......@@ -290,12 +290,13 @@ struct OptimizationPhase<Analyzer, Assembler>::Impl {
V8_INLINE OpIndex ReduceGoto(const GotoOp& op) {
Block* destination = MapToNewGraph(op.destination->index());
assembler.current_block()->SetOrigin(current_input_block);
assembler.Goto(destination);
if (destination->IsBound()) {
DCHECK(destination->IsLoop());
FixLoopPhis(destination);
}
assembler.current_block()->SetOrigin(current_input_block);
return assembler.Goto(destination);
return OpIndex::Invalid();
}
V8_INLINE OpIndex ReduceBranch(const BranchOp& op) {
Block* if_true = MapToNewGraph(op.if_true->index());
......
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