• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=amdgcn -mcpu=bonaire -show-mc-encoding < %s | FileCheck -check-prefix=GCN -check-prefix=CI %s
2; RUN: llc -march=amdgcn -mcpu=tonga -show-mc-encoding < %s | FileCheck -check-prefix=GCN -check-prefix=VI %s
3
4declare void @llvm.amdgcn.s.dcache.inv.vol() #0
5declare void @llvm.amdgcn.s.waitcnt(i32) #0
6
7; GCN-LABEL: {{^}}test_s_dcache_inv_vol:
8; GCN-NEXT: ; BB#0:
9; CI-NEXT: s_dcache_inv_vol ; encoding: [0x00,0x00,0x40,0xc7]
10; VI-NEXT: s_dcache_inv_vol ; encoding: [0x00,0x00,0x88,0xc0,0x00,0x00,0x00,0x00]
11; GCN-NEXT: s_endpgm
12define void @test_s_dcache_inv_vol() #0 {
13  call void @llvm.amdgcn.s.dcache.inv.vol()
14  ret void
15}
16
17; GCN-LABEL: {{^}}test_s_dcache_inv_vol_insert_wait:
18; GCN-NEXT: ; BB#0:
19; GCN-NEXT: s_dcache_inv_vol
20; GCN: s_waitcnt lgkmcnt(0) ; encoding
21define void @test_s_dcache_inv_vol_insert_wait() #0 {
22  call void @llvm.amdgcn.s.dcache.inv.vol()
23  call void @llvm.amdgcn.s.waitcnt(i32 0)
24  br label %end
25
26end:
27  store volatile i32 3, i32 addrspace(1)* undef
28  ret void
29}
30
31attributes #0 = { nounwind }
32