[llvm] [AMDGPU] Support wide register or subregister access when emitting s_singleuse_vdst instructions. (PR #88520)
Scott Egerton via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 16 09:22:07 PDT 2024
================
@@ -398,7 +398,6 @@ body: |
; CHECK-NEXT: successors: %bb.1(0x80000000)
; CHECK-NEXT: liveins: $sgpr0_sgpr1
; CHECK-NEXT: {{ $}}
- ; CHECK-NEXT: S_SINGLEUSE_VDST 1
----------------
ScottEgerton wrote:
I should have mentioned this in the commit message. This test should not be marked as single use as the use is after an exec mask change. This is caused by the change in AMDGPUInsertSingleUseVDST.cpp on line 110 replacing the RegisterUseCount.erase(Reg) with RegisterUseCount[Unit] = 0. When an exec mask change is detected, all registers in RegisterUseCount are given a value of 2 uses to exclude them from being marked as single use producers (line 92). However, when the values were being erased, they were no longer being correctly excluded. Setting the use count to 0 and keeping them in RegisterUseCount prevents this.
https://github.com/llvm/llvm-project/pull/88520
More information about the llvm-commits
mailing list