nir: Don't try to to-SSA ALU instructions that are already SSA.
authorEric Anholt <eric@anholt.net>
Mon, 26 Jan 2015 22:37:42 +0000 (14:37 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 29 Jan 2015 19:43:33 +0000 (11:43 -0800)
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/glsl/nir/nir_to_ssa.c

index 9c577fa99244073f9764ed6ce5b59f11b7ee9d8c..dbe1699c54c1cc3c83ee1db42b63796187a57d73 100644 (file)
@@ -239,6 +239,9 @@ rewrite_alu_instr_forward(nir_alu_instr *instr, rewrite_state *state)
 
    nir_foreach_src(&instr->instr, rewrite_use, state);
 
+   if (instr->dest.dest.is_ssa)
+      return;
+
    nir_register *reg = instr->dest.dest.reg.reg;
    unsigned index = reg->index;