From be4caaf247d8a9908d50e31037421d22bed7a2d6 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sat, 30 Jan 2016 22:08:06 -0500 Subject: [PATCH] nv50/ir: use moveSources to condense sources This makes sure that rIndirectSrc and other things stay updated. Signed-off-by: Ilia Mirkin Reviewed-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp index 30772e6363e..65d11f8237a 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp @@ -2073,14 +2073,9 @@ RegAlloc::InsertConstraintsPass::condenseSrcs(Instruction *insn, merge->setDef(0, lval); for (int s = a, i = 0; s <= b; ++s, ++i) { merge->setSrc(i, insn->getSrc(s)); - insn->setSrc(s, NULL); } + insn->moveSources(b + 1, a - b); insn->setSrc(a, lval); - - for (int k = a + 1, s = b + 1; insn->srcExists(s); ++s, ++k) { - insn->setSrc(k, insn->getSrc(s)); - insn->setSrc(s, NULL); - } insn->bb->insertBefore(insn, merge); insn->putExtraSources(0, save); -- 2.30.2