Skip to content

Commit 13a5812

Browse files
committed
[AMDGPU] Add test for v_fmamk_f16/v_fmaak_f16 in real-true16. NFC
This is to display a bug in real true16 mode that we do not have an allocatable 16-bit VGPR class and these instructions do not have VOP3 forms for allocatable VGPR_16 to be used. To use these instructions 'VGPR_16_Lo128' must be allocable.
1 parent 7c83fb7 commit 13a5812

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# RUN: not llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=+real-true16 -run-pass=machineverifier -filetype=null %s 2>&1 | FileCheck %s -check-prefix=GFX11
2+
# RUN: not llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=+real-true16 -start-before=greedy,0 -stop-after=virtregrewriter,2 -o - %s 2>&1 | FileCheck %s -check-prefix=GFX11
3+
4+
# FIXME: There is no allocatable 16-bit VGPR class and these instructions
5+
# do not have VOP3 forms for allocatable VGPR_16 to be used.
6+
7+
# GFX11: Cannot use non-allocatable class 'VGPR_16_Lo128' for virtual register
8+
9+
---
10+
name: v_fmamk_f16
11+
tracksRegLiveness: true
12+
body: |
13+
bb.0:
14+
liveins: $vgpr0, $vgpr1
15+
%0:vgpr_32_lo128 = COPY $vgpr0
16+
%1:vgpr_32_lo128 = COPY $vgpr1
17+
%2:vgpr_16_lo128 = nofpexcept V_FMAMK_F16_t16 %0.sub0, 1, %1.sub1, implicit $exec, implicit $mode
18+
S_ENDPGM 0, implicit %2
19+
...
20+
21+
---
22+
name: v_fmaak_f16
23+
tracksRegLiveness: true
24+
body: |
25+
bb.0:
26+
liveins: $vgpr0, $vgpr1
27+
%0:vgpr_32_lo128 = COPY $vgpr0
28+
%1:vgpr_32_lo128 = COPY $vgpr1
29+
%2:vgpr_16_lo128 = nofpexcept V_FMAAK_F16_t16 %0.sub0, %1.sub1, 1, implicit $exec, implicit $mode
30+
S_ENDPGM 0, implicit %2
31+
...

0 commit comments

Comments
 (0)