From dbdc2b160c4662af37f3667e43b8dc6a4ba66cf7 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Wed, 3 Mar 2021 18:52:13 -0500 Subject: [PATCH] nv50/ir: wipe any info about memory when seeing a locking op Signed-off-by: Ilia Mirkin Reviewed-by: Pierre Moreau Part-of: --- src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp index d011df45153..792874577a2 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -3165,6 +3165,10 @@ MemoryOpt::runOpt(BasicBlock *bb) next = ldst->next; if (ldst->op == OP_LOAD || ldst->op == OP_VFETCH) { + if (ldst->subOp == NV50_IR_SUBOP_LOAD_LOCKED) { + purgeRecords(ldst, ldst->src(0).getFile()); + continue; + } if (ldst->isDead()) { // might have been produced by earlier optimization delete_Instruction(prog, ldst); @@ -3172,6 +3176,10 @@ MemoryOpt::runOpt(BasicBlock *bb) } } else if (ldst->op == OP_STORE || ldst->op == OP_EXPORT) { + if (ldst->subOp == NV50_IR_SUBOP_STORE_UNLOCKED) { + purgeRecords(ldst, ldst->src(0).getFile()); + continue; + } if (typeSizeof(ldst->dType) == 4 && ldst->src(1).getFile() == FILE_GPR && ldst->getSrc(1)->getInsn()->op == OP_NOP) {