nir/lower_source_mods: Don't propagate register sources
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 13 Apr 2015 21:13:16 +0000 (14:13 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 23 Apr 2015 01:10:41 +0000 (18:10 -0700)
commit125574d1effcb3e3eda93f2b2975bc6cc606df3e
treefc560faf5adff7c42509c903c5c7a0f51e5a9428
parent296131f4674ee979a8cffe56fc61bbd42110982e
nir/lower_source_mods: Don't propagate register sources

The nir_lower_source_mods pass does a weak form of copy propagation to
clean up all of the mov-with-negate's that get generated.  However, we
weren't properly checking that the sources were SSA and so we could end up
moving a register read which is not, in general, valid.

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