From: Christoph Bumiller Date: Fri, 6 Jan 2012 21:19:42 +0000 (+0100) Subject: nvc0/ir: fix default insertion position in pre-SSA lowering pass X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=405bd00f3c98cb78d1dda1f3bf5d74155b18cd57;p=mesa.git 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). --- diff --git a/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp index 6faef9b68ca..e4d32d0a678 100644 --- a/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp @@ -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);