nv50/ir: avoid creating instructions that can't be emitted
authorIlia Mirkin <imirkin@alum.mit.edu>
Mon, 1 Sep 2014 14:55:27 +0000 (10:55 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 1 Sep 2014 22:38:02 +0000 (18:38 -0400)
commit6c2b079231f84b09b3f35183930afe522baee168
treefbcf5590cda2f721f096698f2f13607aa2ad7f69
parent115d9a5525e74573ced9209063a1d4a551e6eaa4
nv50/ir: avoid creating instructions that can't be emitted

When constant folding a MAD operation, we first fold the multiply and
generate an ADD. However we do so without making sure that the immediate
can be handled in the saturate case. If it can't, load the immediate in
a separate instruction.

Reported-by: Tiziano Bacocco <tizbac2@gmail.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp