Skip to content

Commit 0b2c3c6

Browse files
committed
[AMDGPU] Add test case for issue #71685
The bug was fixed by #71710.
1 parent b93ff3e commit 0b2c3c6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

llvm/test/CodeGen/AMDGPU/fold-vgpr-copy.mir

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,18 @@ body: |
5252
%4:vgpr_32 = nnan ninf nsz arcp contract afn reassoc V_FMAC_F32_e64 2, %1, 0, 1073741824, 0, %3, 0, 0, implicit $mode, implicit $exec
5353
DS_WRITE2_B32_gfx9 undef %5:vgpr_32, killed %4, undef %6:vgpr_32, 0, 1, 0, implicit $exec
5454
...
55+
56+
# GCN-LABEL: name: fma_sgpr_sgpr_use
57+
# GCN: %0:sgpr_32 = IMPLICIT_DEF
58+
# GCN-NEXT: %2:vgpr_32 = V_MOV_B32_e32 1234567, implicit $exec
59+
# GCN-NEXT: %3:vgpr_32 = V_FMAC_F32_e64 0, %0, 0, 1234567, 0, %2, 0, 0, implicit $mode, implicit $exec
60+
---
61+
name: fma_sgpr_sgpr_use
62+
body: |
63+
bb.0:
64+
%0:sgpr_32 = IMPLICIT_DEF
65+
%1:sgpr_32 = S_MOV_B32 1234567
66+
%2:vgpr_32 = COPY %1
67+
%3:vgpr_32 = V_FMAC_F32_e64 0, %0, 0, %1, 0, %2, 0, 0, implicit $mode, implicit $exec
68+
S_ENDPGM 0, implicit %3
69+
...

0 commit comments

Comments
 (0)