nv50/ir: clean up saturated values immediately
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 12 Aug 2017 17:43:34 +0000 (13:43 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 12 Aug 2017 18:49:08 +0000 (14:49 -0400)
commit165e18dd219fbf4d60fd582b02e2dbf75ccd026f
tree5757070b42322ca6d648dfbf92b92dd14114df60
parentea22ac23e04c093f9dd0bb8f9b946e61d79824ff
nv50/ir: clean up saturated values immediately

Since we don't iterate to a fixed point, we can end up in situations
where we have a SAT instruction + a long immediate. This is not legal.
However since it's immediately computable, just run unary straight away
to handle the situation.

Fixes: 24a799ad35a82 ("nv50/ir: fix ConstantFolding with saturation")
Reported-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp