nv50/ir: fix lowering of predicated instructions (without defs)
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Wed, 12 Jun 2013 19:00:41 +0000 (21:00 +0200)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 23 May 2014 16:34:38 +0000 (12:34 -0400)
Note that predicated instructions with defs are still not supported
because transformation to SSA doesn't handle them yet.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.2" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp

index 0fb76663ffe5c9c24e5987cc2badaafb8dca8439..ed06def24ff1bdab2c04c80e6505be07a5ba8c0c 100644 (file)
@@ -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);