Skip to content

Commit 244b230

Browse files
hjagasiaAMDarsenmronlieb
authored
[AMDGPU] Precommit test for issue in amdgpu-rewrite-agpr-copy-mfma, (#168609)
which reassigns scale operand in vgpr_32 register to agpr_32, not permitted by instruction format. Reduced from ck. --------- Co-authored-by: Matt Arsenault <[email protected]> Co-authored-by: theRonShark <[email protected]>
1 parent a3f6c43 commit 244b230

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# RUN: not llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx950 -run-pass=greedy,amdgpu-rewrite-agpr-copy-mfma -verify-machineinstrs -o - %s 2>&1 | FileCheck %s
2+
# CHECK: Illegal virtual register for instruction
3+
# CHECK: Expected a VGPR_32 register, but got a AGPR_32 register
4+
5+
# Test for issue in amdgpu-rewrite-agpr-copy-mfma, which reassigns scale operand
6+
# in vgpr_32 register to agpr_32, not permitted by instruction format.
7+
---
8+
name: test
9+
tracksRegLiveness: true
10+
body: |
11+
bb.0:
12+
liveins:
13+
14+
%0:vgpr_32 = IMPLICIT_DEF
15+
%1:av_128_align2 = IMPLICIT_DEF
16+
undef %2.sub0:vreg_128_align2 = IMPLICIT_DEF
17+
18+
bb.1:
19+
liveins:
20+
21+
%3:vgpr_32 = IMPLICIT_DEF
22+
%4:av_128_align2 = IMPLICIT_DEF
23+
%5:vreg_128_align2 = V_MFMA_SCALE_F32_16X16X128_F8F6F4_f4_f4_vgprcd_e64 %4, %1, %2, 4, 4, %3, %0, 4, 0, implicit $mode, implicit $exec
24+
%6:agpr_32 = IMPLICIT_DEF
25+
%0:vgpr_32 = COPY %6
26+
S_CBRANCH_SCC1 %bb.1, implicit undef $scc
27+
S_BRANCH %bb.2
28+
29+
bb.2:
30+
liveins:
31+
32+
S_ENDPGM 0
33+
...

0 commit comments

Comments
 (0)