AMDGPU: Add pass to detect used kernel features
[oota-llvm.git] / test / CodeGen / AMDGPU / llvm.amdgcn.s.dcache.wb.ll
1 ; RUN: llc -march=amdgcn -mcpu=fiji -show-mc-encoding < %s | FileCheck -check-prefix=VI %s
2
3 declare void @llvm.amdgcn.s.dcache.wb() #0
4
5 ; VI-LABEL: {{^}}test_s_dcache_wb:
6 ; VI-NEXT: ; BB#0:
7 ; VI-NEXT: s_dcache_wb ; encoding: [0x00,0x00,0x84,0xc0,0x00,0x00,0x00,0x00]
8 ; VI-NEXT: s_endpgm
9 define void @test_s_dcache_wb() #0 {
10   call void @llvm.amdgcn.s.dcache.wb()
11   ret void
12 }
13
14 ; VI-LABEL: {{^}}test_s_dcache_wb_insert_wait:
15 ; VI-NEXT: ; BB#0:
16 ; VI-NEXT: s_dcache_wb
17 ; VI-NEXT: s_waitcnt lgkmcnt(0) ; encoding
18 define void @test_s_dcache_wb_insert_wait() #0 {
19   call void @llvm.amdgcn.s.dcache.wb()
20   br label %end
21
22 end:
23   store volatile i32 3, i32 addrspace(1)* undef
24   ret void
25 }
26
27 attributes #0 = { nounwind }