xref: /aosp_15_r20/external/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.s.dcache.wb.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=amdgcn -mcpu=fiji -show-mc-encoding < %s | FileCheck -check-prefix=VI %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.amdgcn.s.dcache.wb() #0
4*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.amdgcn.s.waitcnt(i32) #0
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker; VI-LABEL: {{^}}test_s_dcache_wb:
7*9880d681SAndroid Build Coastguard Worker; VI-NEXT: ; BB#0:
8*9880d681SAndroid Build Coastguard Worker; VI-NEXT: s_dcache_wb ; encoding: [0x00,0x00,0x84,0xc0,0x00,0x00,0x00,0x00]
9*9880d681SAndroid Build Coastguard Worker; VI-NEXT: s_endpgm
10*9880d681SAndroid Build Coastguard Workerdefine void @test_s_dcache_wb() #0 {
11*9880d681SAndroid Build Coastguard Worker  call void @llvm.amdgcn.s.dcache.wb()
12*9880d681SAndroid Build Coastguard Worker  ret void
13*9880d681SAndroid Build Coastguard Worker}
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Worker; VI-LABEL: {{^}}test_s_dcache_wb_insert_wait:
16*9880d681SAndroid Build Coastguard Worker; VI-NEXT: ; BB#0:
17*9880d681SAndroid Build Coastguard Worker; VI-NEXT: s_dcache_wb
18*9880d681SAndroid Build Coastguard Worker; VI: s_waitcnt lgkmcnt(0) ; encoding
19*9880d681SAndroid Build Coastguard Workerdefine void @test_s_dcache_wb_insert_wait() #0 {
20*9880d681SAndroid Build Coastguard Worker  call void @llvm.amdgcn.s.dcache.wb()
21*9880d681SAndroid Build Coastguard Worker  call void @llvm.amdgcn.s.waitcnt(i32 0)
22*9880d681SAndroid Build Coastguard Worker  br label %end
23*9880d681SAndroid Build Coastguard Worker
24*9880d681SAndroid Build Coastguard Workerend:
25*9880d681SAndroid Build Coastguard Worker  store volatile i32 3, i32 addrspace(1)* undef
26*9880d681SAndroid Build Coastguard Worker  ret void
27*9880d681SAndroid Build Coastguard Worker}
28*9880d681SAndroid Build Coastguard Worker
29*9880d681SAndroid Build Coastguard Workerattributes #0 = { nounwind }
30