1 ; RUN: llc -mtriple=amdgcn -mcpu=tahiti -show-mc-encoding < %s | FileCheck -check-prefix=GCN -check-prefix=SI %s
2 ; RUN: llc -mtriple=amdgcn -mcpu=fiji -show-mc-encoding < %s | FileCheck -check-prefix=GCN -check-prefix=VI %s
4 declare void @llvm.amdgcn.s.dcache.inv() #0
5 declare void @llvm.amdgcn.s.waitcnt(i32) #0
7 ; GCN-LABEL: {{^}}test_s_dcache_inv:
9 ; SI-NEXT: s_dcache_inv ; encoding: [0x00,0x00,0xc0,0xc7]
10 ; VI-NEXT: s_dcache_inv ; encoding: [0x00,0x00,0x80,0xc0,0x00,0x00,0x00,0x00]
12 define amdgpu_kernel void @test_s_dcache_inv() #0 {
13 call void @llvm.amdgcn.s.dcache.inv()
17 ; GCN-LABEL: {{^}}test_s_dcache_inv_insert_wait:
20 ; GCN: s_waitcnt lgkmcnt(0) ; encoding
21 define amdgpu_kernel void @test_s_dcache_inv_insert_wait() #0 {
22 call void @llvm.amdgcn.s.dcache.inv()
23 call void @llvm.amdgcn.s.waitcnt(i32 127)
27 store volatile i32 3, ptr addrspace(1) undef
31 attributes #0 = { nounwind }