Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / AMDGPU / gfx11_asm_operands.s
blobd3efcf1987318c033ba0faddc3a923699eb0e47a
1 // RUN: llvm-mc -triple=amdgcn -mcpu=gfx1030 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
2 // RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1100 -show-encoding %s | FileCheck --check-prefix=GFX11 %s
3 // RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1100 -show-encoding %s 2>&1 | FileCheck --check-prefixes=GFX11-ERR %s
5 // On GFX11+, EXECZ and VCCZ are no longer allowed to be used as sources to SALU and VALU instructions.
6 // The inline constants are removed. VCCZ and EXECZ still exist and can be use for conditional branches.
7 // LDS_DIRECT and POPS_EXITING_WAVE_ID are also no longer allowed.
9 //---------------------------------------------------------------------------//
10 // EXECZ
11 //---------------------------------------------------------------------------//
13 s_cbranch_execz 0x100
14 // GFX10: encoding: [0x00,0x01,0x88,0xbf]
15 // GFX11: encoding: [0x00,0x01,0xa5,0xbf]
17 s_add_i32 s0, execz, s2
18 // GFX10: encoding: [0xfc,0x02,0x00,0x81]
19 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
21 s_add_i32 s0, src_execz, s2
22 // GFX10: encoding: [0xfc,0x02,0x00,0x81]
23 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
25 s_add_i32 s0, s1, execz
26 // GFX10: encoding: [0x01,0xfc,0x00,0x81]
27 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
29 s_add_i32 s0, s1, src_execz
30 // GFX10: encoding: [0x01,0xfc,0x00,0x81]
31 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
33 v_add_f64 v[0:1], execz, v[2:3]
34 // GFX10: encoding: [0x00,0x00,0x64,0xd5,0xfc,0x04,0x02,0x00]
35 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
37 v_add_f64 v[0:1], src_execz, v[2:3]
38 // GFX10: encoding: [0x00,0x00,0x64,0xd5,0xfc,0x04,0x02,0x00]
39 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
41 v_add_f64 v[0:1], v[1:2], execz
42 // GFX10: encoding: [0x00,0x00,0x64,0xd5,0x01,0xf9,0x01,0x00]
43 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
45 v_add_f64 v[0:1], v[1:2], src_execz
46 // GFX10: encoding: [0x00,0x00,0x64,0xd5,0x01,0xf9,0x01,0x00]
47 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
49 //---------------------------------------------------------------------------//
50 // VCCZ
51 //---------------------------------------------------------------------------//
53 s_cbranch_vccz 0x100
54 // GFX10: encoding: [0x00,0x01,0x86,0xbf]
55 // GFX11: encoding: [0x00,0x01,0xa3,0xbf]
57 s_add_i32 s0, vccz, s2
58 // GFX10: encoding: [0xfb,0x02,0x00,0x81]
59 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
61 s_add_i32 s0, src_vccz, s2
62 // GFX10: encoding: [0xfb,0x02,0x00,0x81]
63 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
65 s_add_i32 s0, s1, vccz
66 // GFX10: encoding: [0x01,0xfb,0x00,0x81]
67 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
69 s_add_i32 s0, s1, src_vccz
70 // GFX10: encoding: [0x01,0xfb,0x00,0x81]
71 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
73 v_add_f64 v[0:1], vccz, v[2:3]
74 // GFX10: encoding: [0x00,0x00,0x64,0xd5,0xfb,0x04,0x02,0x00]
75 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
77 v_add_f64 v[0:1], src_vccz, v[2:3]
78 // GFX10: encoding: [0x00,0x00,0x64,0xd5,0xfb,0x04,0x02,0x00]
79 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
81 v_add_f64 v[0:1], v[1:2], vccz
82 // GFX10: encoding: [0x00,0x00,0x64,0xd5,0x01,0xf7,0x01,0x00]
83 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
85 v_add_f64 v[0:1], v[1:2], src_vccz
86 // GFX10: encoding: [0x00,0x00,0x64,0xd5,0x01,0xf7,0x01,0x00]
87 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: execz and vccz are not supported on this GPU
89 //---------------------------------------------------------------------------//
90 // LDS_DIRECT
91 //---------------------------------------------------------------------------//
93 v_readfirstlane_b32 s0, lds_direct
94 // GFX10: encoding: [0xfe,0x04,0x00,0x7e]
95 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: lds_direct is not supported on this GPU
97 v_readfirstlane_b32 s0, src_lds_direct
98 // GFX10: encoding: [0xfe,0x04,0x00,0x7e]
99 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: lds_direct is not supported on this GPU
101 v_mov_b32 v0, lds_direct
102 // GFX10: encoding: [0xfe,0x02,0x00,0x7e]
103 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: lds_direct is not supported on this GPU
105 v_mov_b32 v0, src_lds_direct
106 // GFX10: encoding: [0xfe,0x02,0x00,0x7e]
107 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: lds_direct is not supported on this GPU
109 //---------------------------------------------------------------------------//
110 // POPS_EXITING_WAVE_ID
111 //---------------------------------------------------------------------------//
113 s_add_i32 s0, src_pops_exiting_wave_id, s1
114 // GFX10: encoding: [0xef,0x01,0x00,0x81]
115 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: register not available on this GPU
117 s_add_i32 s0, s1, src_pops_exiting_wave_id
118 // GFX10: encoding: [0x01,0xef,0x00,0x81]
119 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: register not available on this GPU
121 s_add_i32 s0, pops_exiting_wave_id, s1
122 // GFX10: encoding: [0xef,0x01,0x00,0x81]
123 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: register not available on this GPU
125 s_add_i32 s0, s1, pops_exiting_wave_id
126 // GFX10: encoding: [0x01,0xef,0x00,0x81]
127 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: register not available on this GPU
129 v_add_co_u32 v0, s0, pops_exiting_wave_id, v1
130 // GFX10: encoding: [0x00,0x00,0x0f,0xd7,0xef,0x02,0x02,0x00]
131 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: register not available on this GPU
133 v_add_co_u32 v0, s0, src_pops_exiting_wave_id, v1
134 // GFX10: encoding: [0x00,0x00,0x0f,0xd7,0xef,0x02,0x02,0x00]
135 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: register not available on this GPU
137 v_add_co_u32 v0, s0, v1, pops_exiting_wave_id
138 // GFX10: encoding: [0x00,0x00,0x0f,0xd7,0x01,0xdf,0x01,0x00]
139 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: register not available on this GPU
141 v_add_co_u32 v0, s0, v1, src_pops_exiting_wave_id
142 // GFX10: encoding: [0x00,0x00,0x0f,0xd7,0x01,0xdf,0x01,0x00]
143 // GFX11-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: register not available on this GPU