nir/peephole_select: Copy instructions into the block before the if
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 16 Mar 2015 21:55:00 +0000 (14:55 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 18 Mar 2015 00:11:05 +0000 (17:11 -0700)
commit1be862c0c4965a0184908df736a30d354498ba3d
tree42c00f8b5eb2dc39488db3a86f51aa0595921f7f
parent8cf40ed05dbd3a62ee817e7ebc9409cf327c10ce
nir/peephole_select: Copy instructions into the block before the if

Previously we tried to do poor-man's copy propagation as we created the
select instructions.  Instead, this commit just moves the instructions from
the blocks inside the if into the block before.  Copy propagation will take
care of making sure we don't have any extra mov's in there for us.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/nir/nir_opt_peephole_select.c