i965 new VS: Fix copy propagation of double negatives.
authorPaul Berry <stereotype441@gmail.com>
Thu, 15 Sep 2011 00:06:35 +0000 (17:06 -0700)
committerPaul Berry <stereotype441@gmail.com>
Mon, 19 Sep 2011 17:24:08 +0000 (10:24 -0700)
commit20da49b2677fcf6a721b8a46e037a01e842fee61
tree8cdccd61042a2abf539364b248ae6d7b22d3f36f
parent24a113093b9bf4620b35fe77f4a7cec47ad457c8
i965 new VS: Fix copy propagation of double negatives.

When copy propagating a value into an instruction that negates its
argument, we need to invert the sense of the value's "negate" flag, so
that -(+x) becomes -x and -(-x) becomes +x.

Previously, we were always setting the value's "negate" flag to true
in this circumstance, so that both -(+x) and -(-x) turned into -x.

Fixes Piglit test vs-double-negative.shader_test.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp