1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -verify-machineinstrs < %s | FileCheck -check-prefixes=GFX11,GFX11-SDAG %s
3 ; RUN: llc -global-isel -mtriple=amdgcn -mcpu=gfx1100 -verify-machineinstrs < %s | FileCheck -check-prefixes=GFX11,GFX11-GISEL %s
5 declare i32 @llvm.amdgcn.permlane64(i32)
6 declare i32 @llvm.amdgcn.workitem.id.x()
8 define amdgpu_kernel void @test_s(ptr addrspace(1) %out, i32 %src0) {
11 ; GFX11-NEXT: s_clause 0x1
12 ; GFX11-NEXT: s_load_b32 s4, s[2:3], 0x2c
13 ; GFX11-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
14 ; GFX11-NEXT: s_waitcnt lgkmcnt(0)
15 ; GFX11-NEXT: v_dual_mov_b32 v1, 0 :: v_dual_mov_b32 v0, s4
16 ; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
17 ; GFX11-NEXT: v_permlane64_b32 v0, v0
18 ; GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
20 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
21 ; GFX11-NEXT: s_endpgm
22 %v = call i32 @llvm.amdgcn.permlane64(i32 %src0)
23 store i32 %v, ptr addrspace(1) %out
27 define amdgpu_kernel void @test_i(ptr addrspace(1) %out) {
28 ; GFX11-LABEL: test_i:
30 ; GFX11-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
31 ; GFX11-NEXT: v_dual_mov_b32 v0, 0x63 :: v_dual_mov_b32 v1, 0
32 ; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
33 ; GFX11-NEXT: v_permlane64_b32 v0, v0
34 ; GFX11-NEXT: s_waitcnt lgkmcnt(0)
35 ; GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
37 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
38 ; GFX11-NEXT: s_endpgm
39 %v = call i32 @llvm.amdgcn.permlane64(i32 99)
40 store i32 %v, ptr addrspace(1) %out
44 define amdgpu_kernel void @test_v(ptr addrspace(1) %out, i32 %src0) #1 {
45 ; GFX11-LABEL: test_v:
47 ; GFX11-NEXT: s_load_b64 s[0:1], s[2:3], 0x24
48 ; GFX11-NEXT: v_dual_mov_b32 v1, 0 :: v_dual_and_b32 v0, 0x3ff, v0
49 ; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
50 ; GFX11-NEXT: v_permlane64_b32 v0, v0
51 ; GFX11-NEXT: s_waitcnt lgkmcnt(0)
52 ; GFX11-NEXT: global_store_b32 v1, v0, s[0:1]
54 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
55 ; GFX11-NEXT: s_endpgm
56 %tidx = call i32 @llvm.amdgcn.workitem.id.x()
57 %v = call i32 @llvm.amdgcn.permlane64(i32 %tidx)
58 store i32 %v, ptr addrspace(1) %out
61 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: