aco: use apply_nuw_to_ssa() with load_smem_amd
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 18 Apr 2023 13:58:57 +0000 (14:58 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 19 Apr 2023 19:29:48 +0000 (19:29 +0000)
fossil-db (navi21):
Totals from 107 (0.08% of 135636) affected shaders:
Instrs: 389667 -> 389425 (-0.06%); split: -0.06%, +0.00%
CodeSize: 2050380 -> 2049440 (-0.05%); split: -0.05%, +0.00%
Latency: 3738053 -> 3737313 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 599889 -> 599790 (-0.02%); split: -0.02%, +0.00%
SClause: 16120 -> 15920 (-1.24%)
Copies: 29823 -> 29809 (-0.05%); split: -0.07%, +0.02%
PreSGPRs: 6856 -> 6849 (-0.10%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22553>

src/amd/compiler/aco_instruction_selection_setup.cpp

index a4bcca7..d77266f 100644 (file)
@@ -232,7 +232,8 @@ apply_nuw_to_offsets(isel_context* ctx, nir_function_impl* impl)
                apply_nuw_to_ssa(ctx, intrin->src[2].ssa);
             break;
          case nir_intrinsic_load_scratch: apply_nuw_to_ssa(ctx, intrin->src[0].ssa); break;
-         case nir_intrinsic_store_scratch: apply_nuw_to_ssa(ctx, intrin->src[1].ssa); break;
+         case nir_intrinsic_store_scratch:
+         case nir_intrinsic_load_smem_amd: apply_nuw_to_ssa(ctx, intrin->src[1].ssa); break;
          default: break;
          }
       }