1 ; RUN: opt -S -mtriple=amdgcn-- -passes=load-store-vectorizer < %s | FileCheck -check-prefix=OPT %s
3 ; OPT-LABEL: @buffer_fat_ptrs(
4 define void @buffer_fat_ptrs(ptr addrspace(7) %out) {
6 %a1 = getelementptr i32, ptr addrspace(7) %out, i32 1
7 %a2 = getelementptr i32, ptr addrspace(7) %out, i32 2
8 %a3 = getelementptr i32, ptr addrspace(7) %out, i32 3
10 ; OPT: store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, ptr addrspace(7) %out, align 4
11 store i32 0, ptr addrspace(7) %out
12 store i32 1, ptr addrspace(7) %a1
13 store i32 2, ptr addrspace(7) %a2
14 store i32 3, ptr addrspace(7) %a3
18 ; OPT-LABEL: @buffer_strided_ptrs(
19 define void @buffer_strided_ptrs(ptr addrspace(9) %out) {
21 %a1 = getelementptr i32, ptr addrspace(9) %out, i32 1
22 %a2 = getelementptr i32, ptr addrspace(9) %out, i32 2
23 %a3 = getelementptr i32, ptr addrspace(9) %out, i32 3
25 ; OPT: store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, ptr addrspace(9) %out, align 4
26 store i32 0, ptr addrspace(9) %out
27 store i32 1, ptr addrspace(9) %a1
28 store i32 2, ptr addrspace(9) %a2
29 store i32 3, ptr addrspace(9) %a3