nvc0/ir: fix default insertion position in pre-SSA lowering pass
Always set position to insert before the current instruction, the previous behaviour led to confusion (bug in checkPredicate for BBs with only a single conditional branch).
This commit is contained in:
parent
dc4c821f08
commit
405bd00f3c
1 changed files with 1 additions and 7 deletions
|
|
@ -657,13 +657,7 @@ NVC0LoweringPass::checkPredicate(Instruction *insn)
|
|||
bool
|
||||
NVC0LoweringPass::visit(Instruction *i)
|
||||
{
|
||||
if (i->prev)
|
||||
bld.setPosition(i->prev, true);
|
||||
else
|
||||
if (i->next)
|
||||
bld.setPosition(i->next, false);
|
||||
else
|
||||
bld.setPosition(i->bb, true);
|
||||
bld.setPosition(i, false);
|
||||
|
||||
if (i->cc != CC_ALWAYS)
|
||||
checkPredicate(i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue