From: Christoph Bumiller Date: Wed, 12 Jun 2013 19:00:41 +0000 (+0200) Subject: nv50/ir: fix lowering of predicated instructions (without defs) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=452a4151aa1eebbc12b621a465fc452fdb95a08b;p=mesa.git nv50/ir: fix lowering of predicated instructions (without defs) Note that predicated instructions with defs are still not supported because transformation to SSA doesn't handle them yet. Reviewed-by: Ilia Mirkin Cc: "10.2" --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp index 0fb76663ffe..ed06def24ff 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp @@ -1279,8 +1279,11 @@ NV50LoweringPreSSA::checkPredicate(Instruction *insn) Value *pred = insn->getPredicate(); Value *cdst; - if (!pred || pred->reg.file == FILE_FLAGS) + // FILE_PREDICATE will simply be changed to FLAGS on conversion to SSA + if (!pred || + pred->reg.file == FILE_FLAGS || pred->reg.file == FILE_PREDICATE) return; + cdst = bld.getSSA(1, FILE_FLAGS); bld.mkCmp(OP_SET, CC_NEU, insn->dType, cdst, insn->dType, bld.loadImm(NULL, 0), pred);