nv50/ir: avoid inlining results of a locked load

These are a bit special. Among other things, removing them will cause us
to potentially remove the load itself, defeating the purpose of the
locking. Also it's unclear whether it's legal to access the shared
memory directly when it's locked like this.

This only comes up on nv50, since on nvc0+, shared memory can't be
loaded from random ops.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
This commit is contained in:
Ilia Mirkin 2021-03-01 18:57:56 -05:00
parent 7052927ee4
commit d0fa6e066b
1 changed files with 2 additions and 0 deletions

View File

@ -276,6 +276,8 @@ LoadPropagation::visit(BasicBlock *bb)
if (!ld || ld->fixed || (ld->op != OP_LOAD && ld->op != OP_MOV))
continue;
if (ld->op == OP_LOAD && ld->subOp == NV50_IR_SUBOP_LOAD_LOCKED)
continue;
if (!targ->insnCanLoad(i, s, ld))
continue;