1 ; RUN: opt -mtriple=nvptx64-nvidia-cuda -passes=load-store-vectorizer -S -o - %s | FileCheck %s
3 define void @i1x8(ptr nocapture align 4 %ptr) {
4 %ptr0 = getelementptr i8, ptr %ptr, i64 0
5 %ptr1 = getelementptr i8, ptr %ptr, i64 1
6 %ptr2 = getelementptr i8, ptr %ptr, i64 2
7 %ptr3 = getelementptr i8, ptr %ptr, i64 3
9 %l0 = load <8 x i1>, ptr %ptr0, align 4
10 %l1 = load <8 x i1>, ptr %ptr1, align 1
11 %l2 = load <8 x i1>, ptr %ptr2, align 2
12 %l3 = load <8 x i1>, ptr %ptr3, align 1
17 ; CHECK-DAG: load <32 x i1>
20 define void @i1x8x16x8(ptr nocapture align 4 %ptr) {
21 %ptr0 = getelementptr i8, ptr %ptr, i64 0
22 %ptr1 = getelementptr i8, ptr %ptr, i64 1
23 %ptr2 = getelementptr i8, ptr %ptr, i64 3
25 %l0 = load <8 x i1>, ptr %ptr0, align 4
26 %l2 = load <16 x i1>, ptr %ptr1, align 1
27 %l3 = load <8 x i1>, ptr %ptr2, align 1
31 ; CHECK-LABEL: @i1x8x16x8
32 ; CHECK-DAG: load <32 x i1>