i965/cse: Don't eliminate instructions with side-effects
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 8 Aug 2014 21:30:25 +0000 (14:30 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 11 Aug 2014 18:40:32 +0000 (11:40 -0700)
commitf5cc3fdcf1680b116612fac7c39f1bd79f5e555e
treeba2008c83a046d3e7e42a5c947a31664ed9db921
parent34ee3f5a343a9a9dde16994e35bb0b7ba8eab07a
i965/cse: Don't eliminate instructions with side-effects

This casues problems when converting atomics to use the GRF.  Sometimes the atomic operation would get eaten by CSE when it shouldn't.

v2: Roll the has_side_effects check into is_expression

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_cse.cpp
src/mesa/drivers/dri/i965/brw_vec4_cse.cpp