1 // RUN
: not llvm-mc
-triple
=amdgcn
-show-encoding
%s | FileCheck
--check-prefix
=SICI
%s
2 // RUN
: not llvm-mc
-triple
=amdgcn
-mcpu
=tahiti
-show-encoding
%s | FileCheck
--check-prefix
=SICI
%s
3 // RUN
: not llvm-mc
-triple
=amdgcn
-mcpu
=tonga
-show-encoding
%s | FileCheck
--check-prefix
=VI
%s
4 // RUN
: not llvm-mc
-triple
=amdgcn
-mcpu
=gfx900
-show-encoding
%s | FileCheck
-check-prefix
=GFX9
%s
5 // RUN
: not llvm-mc
-triple
=amdgcn
-mcpu
=gfx1010
-show-encoding
%s | FileCheck
-check-prefix
=GFX10
%s
6 // RUN
: not llvm-mc
-triple
=amdgcn
-mcpu
=gfx1100
-show-encoding
%s | FileCheck
-check-prefix
=GFX11
%s
8 // RUN
: not llvm-mc
-triple
=amdgcn
%s
2>&1 | FileCheck
-check-prefixes
=GCN
,SICIVI-ERR
--implicit-check-
not=error
: %s
9 // RUN
: not llvm-mc
-triple
=amdgcn
-mcpu
=tahiti
%s
2>&1 | FileCheck
-check-prefixes
=GCN
,SICIVI-ERR
--implicit-check-
not=error
: %s
10 // RUN
: not llvm-mc
-triple
=amdgcn
-mcpu
=tonga
%s
2>&1 | FileCheck
-check-prefixes
=GCN
,SICIVI-ERR
--implicit-check-
not=error
: %s
11 // RUN
: not llvm-mc
-triple
=amdgcn
-mcpu
=gfx900
%s
2>&1 | FileCheck
-check-prefixes
=GCN
,GFX9-ERR
--implicit-check-
not=error
: %s
12 // RUN
: not llvm-mc
-triple
=amdgcn
-mcpu
=gfx1010
%s
2>&1 | FileCheck
-check-prefixes
=GCN
,GFX10-ERR
--implicit-check-
not=error
: %s
13 // RUN
: not llvm-mc
-triple
=amdgcn
-mcpu
=gfx1100
%s
2>&1 | FileCheck
-check-prefixes
=GCN
,GFX11-ERR
--implicit-check-
not=error
: %s
15 s_setreg_b32
0x1f803, s2
16 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: invalid immediate
: only
16-bit values are legal
18 s_setreg_b32 typo
(0x40), s2
19 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: expected
a hwreg macro
or an absolute expression
21 s_setreg_b32 hwreg
(0x40), s2
22 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: invalid code of hardware register
: only
6-bit values are legal
24 s_setreg_b32 hwreg
(HW_REG_WRONG
), s2
25 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: expected
a register name
or an absolute expression
27 s_setreg_b32 hwreg
(1 2,3), s2
28 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: expected
a comma
or a closing parenthesis
30 s_setreg_b32 hwreg
(1,2 3), s2
31 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: expected
a comma
33 s_setreg_b32 hwreg
(1,2,3, s2
34 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: expected
a closing parenthesis
36 s_setreg_b32 hwreg
(3,32,32), s2
37 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: invalid bit offset
: only
5-bit values are legal
39 s_setreg_b32 hwreg
(3,0,33), s2
40 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: invalid bitfield width
: only values from
1 to
32 are legal
42 s_setreg_imm32_b32
0x1f803, 0xff
43 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: invalid immediate
: only
16-bit values are legal
45 s_setreg_imm32_b32 hwreg
(3,0,33), 0xff
46 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: invalid bitfield width
: only values from
1 to
32 are legal
48 s_getreg_b32 s2
, hwreg
(3,32,32)
49 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: invalid bit offset
: only
5-bit values are legal
51 s_cbranch_i_fork s
[2:3], 0x6
52 // SICI
: s_cbranch_i_fork s
[2:3], 6 ; encoding
: [0x06,0x00,0x82,0xb8]
53 // GFX10-ERR
: :[[@LINE-
2]]:{{[0-9]+}}: error
: instruction
not supported on this GPU
54 // GFX9
: s_cbranch_i_fork s
[2:3], 6 ; encoding
: [0x06,0x00,0x02,0xb8]
55 // VI
: s_cbranch_i_fork s
[2:3], 6 ; encoding
: [0x06,0x00,0x02,0xb8]
56 // GFX11-ERR
: :[[@LINE-
5]]:{{[0-9]+}}: error
: instruction
not supported on this GPU
58 s_getreg_b32 s2
, hwreg
(HW_REG_SH_MEM_BASES
)
59 // GFX10
: s_getreg_b32 s2
, hwreg
(HW_REG_SH_MEM_BASES
) ; encoding
: [0x0f,0xf8,0x02,0xb9]
60 // SICIVI-ERR
: :[[@LINE-
2]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
61 // GFX9
: s_getreg_b32 s2
, hwreg
(HW_REG_SH_MEM_BASES
) ; encoding
: [0x0f,0xf8,0x82,0xb8]
62 // GFX11
: s_getreg_b32 s2
, hwreg
(HW_REG_SH_MEM_BASES
) ; encoding
: [0x0f,0xf8,0x82,0xb8]
64 s_getreg_b32 s2
, hwreg
(HW_REG_TBA_LO
)
65 // GFX10
: s_getreg_b32 s2
, hwreg
(HW_REG_TBA_LO
) ; encoding
: [0x10,0xf8,0x02,0xb9]
66 // SICIVI-ERR
: :[[@LINE-
2]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
67 // GFX11-ERR
: :[[@LINE-
3]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
68 // GFX9
: s_getreg_b32 s2
, hwreg
(HW_REG_TBA_LO
) ; encoding
: [0x10,0xf8,0x82,0xb8]
70 s_getreg_b32 s2
, hwreg
(HW_REG_TBA_HI
)
71 // GFX10
: s_getreg_b32 s2
, hwreg
(HW_REG_TBA_HI
) ; encoding
: [0x11,0xf8,0x02,0xb9]
72 // SICIVI-ERR
: :[[@LINE-
2]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
73 // GFX11-ERR
: :[[@LINE-
3]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
74 // GFX9
: s_getreg_b32 s2
, hwreg
(HW_REG_TBA_HI
) ; encoding
: [0x11,0xf8,0x82,0xb8]
76 s_getreg_b32 s2
, hwreg
(HW_REG_TMA_LO
)
77 // GFX10
: s_getreg_b32 s2
, hwreg
(HW_REG_TMA_LO
) ; encoding
: [0x12,0xf8,0x02,0xb9]
78 // SICIVI-ERR
: :[[@LINE-
2]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
79 // GFX11-ERR
: :[[@LINE-
3]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
80 // GFX9
: s_getreg_b32 s2
, hwreg
(HW_REG_TMA_LO
) ; encoding
: [0x12,0xf8,0x82,0xb8]
82 s_getreg_b32 s2
, hwreg
(HW_REG_TMA_HI
)
83 // GFX10
: s_getreg_b32 s2
, hwreg
(HW_REG_TMA_HI
) ; encoding
: [0x13,0xf8,0x02,0xb9]
84 // SICIVI-ERR
: :[[@LINE-
2]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
85 // GFX11-ERR
: :[[@LINE-
3]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
86 // GFX9
: s_getreg_b32 s2
, hwreg
(HW_REG_TMA_HI
) ; encoding
: [0x13,0xf8,0x82,0xb8]
88 s_getreg_b32 s2
, hwreg
(HW_REG_FLAT_SCR_LO
)
89 // GFX10
: s_getreg_b32 s2
, hwreg
(HW_REG_FLAT_SCR_LO
) ; encoding
: [0x14,0xf8,0x02,0xb9]
90 // SICIVI-ERR
: :[[@LINE-
2]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
91 // GFX9-ERR
: :[[@LINE-
3]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
92 // GFX11
: s_getreg_b32 s2
, hwreg
(HW_REG_FLAT_SCR_LO
) ; encoding
: [0x14,0xf8,0x82,0xb8]
94 s_getreg_b32 s2
, hwreg
(HW_REG_FLAT_SCR_HI
)
95 // GFX10
: s_getreg_b32 s2
, hwreg
(HW_REG_FLAT_SCR_HI
) ; encoding
: [0x15,0xf8,0x02,0xb9]
96 // SICIVI-ERR
: :[[@LINE-
2]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
97 // GFX9-ERR
: :[[@LINE-
3]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
98 // GFX11
: s_getreg_b32 s2
, hwreg
(HW_REG_FLAT_SCR_HI
) ; encoding
: [0x15,0xf8,0x82,0xb8]
100 s_getreg_b32 s2
, hwreg
(HW_REG_XNACK_MASK
)
101 // GFX10
: s_getreg_b32 s2
, hwreg
(HW_REG_XNACK_MASK
) ; encoding
: [0x16,0xf8,0x02,0xb9]
102 // SICIVI-ERR
: :[[@LINE-
2]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
103 // GFX9-ERR
: :[[@LINE-
3]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
104 // GFX11-ERR
: :[[@LINE-
4]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
106 s_getreg_b32 s2
, hwreg
(HW_REG_POPS_PACKER
)
107 // GFX10
: s_getreg_b32 s2
, hwreg
(HW_REG_POPS_PACKER
) ; encoding
: [0x19,0xf8,0x02,0xb9]
108 // SICIVI-ERR
: :[[@LINE-
2]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
109 // GFX9-ERR
: :[[@LINE-
3]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
110 // GFX11-ERR
: :[[@LINE-
4]]:{{[0-9]+}}: error
: specified hardware register is
not supported on this GPU
113 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
115 s_cmpk_le_u32 s2
, 0x1ffff
116 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
118 s_cmpk_le_u32 s2
, 0x10000
119 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
121 s_mulk_i32 s2
, 0xFFFFFFFFFFFF0000
122 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
124 s_mulk_i32 s2
, 0x10000
125 // GCN
: :[[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction