nir: Don't try to to-SSA ALU instructions that are already SSA.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
This commit is contained in:
Eric Anholt 2015-01-26 14:37:42 -08:00
parent 68d476167c
commit 9a3a60cb13
1 changed files with 3 additions and 0 deletions

View 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;