Matt Arsenault | e66621b | 2015-09-24 19:52:27 +0000 | [diff] [blame] | 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.vol() #0 |
Matt Arsenault | 6d09380 | 2016-05-21 00:29:27 +0000 | [diff] [blame] | 4 | declare void @llvm.amdgcn.s.waitcnt(i32) #0 |
Matt Arsenault | e66621b | 2015-09-24 19:52:27 +0000 | [diff] [blame] | 5 | |
| 6 | ; VI-LABEL: {{^}}test_s_dcache_wb_vol: |
Francis Visoiu Mistrih | 25528d6 | 2017-12-04 17:18:51 +0000 | [diff] [blame] | 7 | ; VI-NEXT: ; %bb.0: |
Matt Arsenault | e66621b | 2015-09-24 19:52:27 +0000 | [diff] [blame] | 8 | ; VI-NEXT: s_dcache_wb_vol ; encoding: [0x00,0x00,0x8c,0xc0,0x00,0x00,0x00,0x00] |
| 9 | ; VI-NEXT: s_endpgm |
Matt Arsenault | 3dbeefa | 2017-03-21 21:39:51 +0000 | [diff] [blame] | 10 | define amdgpu_kernel void @test_s_dcache_wb_vol() #0 { |
Matt Arsenault | e66621b | 2015-09-24 19:52:27 +0000 | [diff] [blame] | 11 | call void @llvm.amdgcn.s.dcache.wb.vol() |
| 12 | ret void |
| 13 | } |
| 14 | |
| 15 | ; VI-LABEL: {{^}}test_s_dcache_wb_vol_insert_wait: |
Francis Visoiu Mistrih | 25528d6 | 2017-12-04 17:18:51 +0000 | [diff] [blame] | 16 | ; VI-NEXT: ; %bb.0: |
Matt Arsenault | e66621b | 2015-09-24 19:52:27 +0000 | [diff] [blame] | 17 | ; VI-NEXT: s_dcache_wb_vol |
Matt Arsenault | 6d09380 | 2016-05-21 00:29:27 +0000 | [diff] [blame] | 18 | ; VI: s_waitcnt lgkmcnt(0) ; encoding |
Matt Arsenault | 3dbeefa | 2017-03-21 21:39:51 +0000 | [diff] [blame] | 19 | define amdgpu_kernel void @test_s_dcache_wb_vol_insert_wait() #0 { |
Matt Arsenault | e66621b | 2015-09-24 19:52:27 +0000 | [diff] [blame] | 20 | call void @llvm.amdgcn.s.dcache.wb.vol() |
Mark Searles | 70359ac | 2017-06-02 14:19:25 +0000 | [diff] [blame] | 21 | call void @llvm.amdgcn.s.waitcnt(i32 127) |
Matt Arsenault | e66621b | 2015-09-24 19:52:27 +0000 | [diff] [blame] | 22 | br label %end |
| 23 | |
| 24 | end: |
| 25 | store volatile i32 3, i32 addrspace(1)* undef |
| 26 | ret void |
| 27 | } |
| 28 | |
| 29 | attributes #0 = { nounwind } |