nvc0/ir: handle a load's reg result not being used for locked variants
authorIlia Mirkin <imirkin@alum.mit.edu>
Thu, 26 May 2016 02:41:06 +0000 (22:41 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 27 May 2016 01:23:49 +0000 (21:23 -0400)
commitdf2881381ac67c42aa8ec9e0ed28f21a1d253785
treed09699ff711d1b3118d9e48acb5b286187a26c94
parent04ecad97ff7b44bd9afd1bff9108dea199723829
nvc0/ir: handle a load's reg result not being used for locked variants

For a load locked, we might not use the first result but the second
result is the predicate result of the locking. In that case the load
splitting logic doesn't apply (which is designed for splitting 128-bit
loads). Instead we take the predicate and move it into the first
position (as having a dead result in first def's position upsets all
sorts of things including RA). Update the emitters to deal with this as
well.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp