OSDN Git Service

nv50/ir: OP_JOIN is a flow instruction
authorJürgen Rühle <j-r@online.de>
Sat, 6 Jun 2015 16:37:20 +0000 (18:37 +0200)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 15 Jun 2015 15:46:32 +0000 (11:46 -0400)
OP_JOIN instructions are assumed to be flow instructions and mercilessly
casted to FlowInstruction.

This patch fixes an instance where an OP_JOIN is created as a plain
instruction. This can cause crashes in the ir printer.

[imirkin: add ->fixed = 1]
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp

index 1ad0860..2c7f7e3 100644 (file)
@@ -887,7 +887,7 @@ NV50LoweringPreSSA::handleTXL(TexInstruction *i)
       }
    }
    bld.setPosition(joinBB, false);
-   bld.mkOp(OP_JOIN, TYPE_NONE, NULL);
+   bld.mkFlow(OP_JOIN, NULL, CC_ALWAYS, NULL)->fixed = 1;
    return true;
 }