nv50/peephole: Disallow combining sub 4-byte ld/st for now
authorPierre Moreau <dev@pmoreau.org>
Mon, 12 Apr 2021 07:26:03 +0000 (09:26 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 23 Aug 2022 18:29:44 +0000 (18:29 +0000)
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10711>

src/nouveau/codegen/nv50_ir_peephole.cpp

index 4da3aa0..4e2b3e6 100644 (file)
@@ -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());