From 4d892829f3586e7b399db9ef6dc13efa3b8f79fd Mon Sep 17 00:00:00 2001 From: Pierre Moreau Date: Mon, 12 Apr 2021 09:26:03 +0200 Subject: [PATCH] nv50/peephole: Disallow combining sub 4-byte ld/st for now Reviewed-by: Karol Herbst Reviewed-by: Ilia Mirkin Signed-off-by: Pierre Moreau Part-of: --- src/nouveau/codegen/nv50_ir_peephole.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/nouveau/codegen/nv50_ir_peephole.cpp b/src/nouveau/codegen/nv50_ir_peephole.cpp index 4da3aa0..4e2b3e6 100644 --- a/src/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/nouveau/codegen/nv50_ir_peephole.cpp @@ -3174,6 +3174,12 @@ MemoryOpt::runOpt(BasicBlock *bb) bool isLoad = true; next = ldst->next; + // TODO: Handle combining sub 4-bytes loads/stores. + if (ldst->op == OP_STORE && typeSizeof(ldst->dType) < 4) { + purgeRecords(ldst, ldst->src(0).getFile()); + continue; + } + if (ldst->op == OP_LOAD || ldst->op == OP_VFETCH) { if (ldst->subOp == NV50_IR_SUBOP_LOAD_LOCKED) { purgeRecords(ldst, ldst->src(0).getFile()); -- 2.7.4