1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -global-isel -march=amdgcn -verify-machineinstrs -mem-intrinsic-expand-size=3 %s -o - | FileCheck -check-prefix=GCN %s
3 ; RUN: llc -global-isel -march=amdgcn -verify-machineinstrs -mem-intrinsic-expand-size=5 %s -o - | FileCheck -check-prefix=GCN %s
5 declare void @llvm.memcpy.inline.p1.p1.i32(ptr addrspace(1), ptr addrspace(1), i32, i1 immarg)
7 define amdgpu_cs void @test(ptr addrspace(1) %dst, ptr addrspace(1) %src) {
10 ; GCN-NEXT: s_mov_b32 s2, 0
11 ; GCN-NEXT: s_mov_b32 s3, 0xf000
12 ; GCN-NEXT: s_mov_b64 s[0:1], 0
13 ; GCN-NEXT: buffer_load_ubyte v4, v[2:3], s[0:3], 0 addr64
14 ; GCN-NEXT: s_waitcnt vmcnt(0)
15 ; GCN-NEXT: buffer_store_byte v4, v[0:1], s[0:3], 0 addr64
16 ; GCN-NEXT: s_waitcnt expcnt(0)
17 ; GCN-NEXT: buffer_load_ubyte v4, v[2:3], s[0:3], 0 addr64 offset:1
18 ; GCN-NEXT: s_waitcnt vmcnt(0)
19 ; GCN-NEXT: buffer_store_byte v4, v[0:1], s[0:3], 0 addr64 offset:1
20 ; GCN-NEXT: s_waitcnt expcnt(0)
21 ; GCN-NEXT: buffer_load_ubyte v4, v[2:3], s[0:3], 0 addr64 offset:2
22 ; GCN-NEXT: s_waitcnt vmcnt(0)
23 ; GCN-NEXT: buffer_store_byte v4, v[0:1], s[0:3], 0 addr64 offset:2
24 ; GCN-NEXT: buffer_load_ubyte v2, v[2:3], s[0:3], 0 addr64 offset:3
25 ; GCN-NEXT: s_waitcnt vmcnt(0)
26 ; GCN-NEXT: buffer_store_byte v2, v[0:1], s[0:3], 0 addr64 offset:3
28 call void @llvm.memcpy.inline.p1.p1.i32(ptr addrspace(1) %dst, ptr addrspace(1) %src, i32 4, i1 false)