1; RUN: llc -march=amdgcn -mcpu=fiji -show-mc-encoding < %s | FileCheck -check-prefix=VI %s
2
3declare void @llvm.amdgcn.s.dcache.wb.vol() #0
4
5; VI-LABEL: {{^}}test_s_dcache_wb_vol:
6; VI-NEXT: ; BB#0:
7; VI-NEXT: s_dcache_wb_vol ; encoding: [0x00,0x00,0x8c,0xc0,0x00,0x00,0x00,0x00]
8; VI-NEXT: s_endpgm
9define void @test_s_dcache_wb_vol() #0 {
10  call void @llvm.amdgcn.s.dcache.wb.vol()
11  ret void
12}
13
14; VI-LABEL: {{^}}test_s_dcache_wb_vol_insert_wait:
15; VI-NEXT: ; BB#0:
16; VI-NEXT: s_dcache_wb_vol
17; VI-NEXT: s_waitcnt lgkmcnt(0) ; encoding
18define void @test_s_dcache_wb_vol_insert_wait() #0 {
19  call void @llvm.amdgcn.s.dcache.wb.vol()
20  br label %end
21
22end:
23  store volatile i32 3, i32 addrspace(1)* undef
24  ret void
25}
26
27attributes #0 = { nounwind }
28