mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 04:00:12 +01:00
nv50/ir: copy joinAt when splitting both before and after
The current implementation only moves the joinAt when splitting after
the given instruction, not before it. So if you have a BB with
foo
instr
bar
joinat
and thus with joinAt set, we end up first splitting before instr, at
which point the instr's bb is updated to the new bb. Since that bb
doesn't have a joinAt set (despite containing one), when splitting after
the instr, there is nothing to copy over. Since the joinat will be in
the "split" bb irrespective of whether we're splitting before or after
the instruction, move it over in either case.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91124
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 5dcb28c3d2)
This commit is contained in:
parent
3fe9fe9cb9
commit
96bed9fea8
3 changed files with 5 additions and 0 deletions
|
|
@ -332,6 +332,9 @@ BasicBlock::splitBefore(Instruction *insn, bool attach)
|
|||
BasicBlock *bb = new BasicBlock(func);
|
||||
assert(!insn || insn->op != OP_PHI);
|
||||
|
||||
bb->joinAt = joinAt;
|
||||
joinAt = NULL;
|
||||
|
||||
splitCommon(insn, bb, attach);
|
||||
return bb;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1698,6 +1698,7 @@ Converter::insertConvergenceOps(BasicBlock *conv, BasicBlock *fork)
|
|||
join->fixed = 1;
|
||||
conv->insertHead(join);
|
||||
|
||||
assert(!fork->joinAt);
|
||||
fork->joinAt = new_FlowInstruction(func, OP_JOINAT, conv);
|
||||
fork->insertBefore(fork->getExit(), fork->joinAt);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -871,6 +871,7 @@ NV50LoweringPreSSA::handleTXL(TexInstruction *i)
|
|||
BasicBlock *joinBB = i->bb->splitAfter(i);
|
||||
|
||||
bld.setPosition(currBB, true);
|
||||
assert(!currBB->joinAt);
|
||||
currBB->joinAt = bld.mkFlow(OP_JOINAT, joinBB, CC_ALWAYS, NULL);
|
||||
|
||||
for (int l = 0; l <= 3; ++l) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue