1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=slp-vectorizer -mtriple=riscv64 -mattr=+v \
3 ; RUN: -riscv-v-vector-bits-min=128 -riscv-v-slp-max-vf=0 -S | FileCheck %s --check-prefixes=CHECK,CHECK-128
4 ; RUN: opt < %s -passes=slp-vectorizer -mtriple=riscv64 -mattr=+v \
5 ; RUN: -riscv-v-vector-bits-min=256 -riscv-v-slp-max-vf=0 -S | FileCheck %s --check-prefixes=CHECK,CHECK-256
6 ; RUN: opt < %s -passes=slp-vectorizer -mtriple=riscv64 -mattr=+v \
7 ; RUN: -riscv-v-vector-bits-min=512 -riscv-v-slp-max-vf=0 -S | FileCheck %s --check-prefixes=CHECK,CHECK-512
9 target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n64-S128"
10 target triple = "riscv64"
12 define void @foo(ptr nocapture writeonly %da) {
15 ; CHECK-NEXT: store <4 x i64> zeroinitializer, ptr [[DA:%.*]], align 8
16 ; CHECK-NEXT: ret void
19 store i64 0, ptr %da, align 8
20 %arrayidx1 = getelementptr inbounds i64, ptr %da, i64 1
21 store i64 0, ptr %arrayidx1, align 8
22 %arrayidx2 = getelementptr inbounds i64, ptr %da, i64 2
23 store i64 0, ptr %arrayidx2, align 8
24 %arrayidx3 = getelementptr inbounds i64, ptr %da, i64 3
25 store i64 0, ptr %arrayidx3, align 8
29 define void @foo8(ptr nocapture writeonly %da) {
32 ; CHECK-NEXT: store i8 0, ptr [[DA:%.*]], align 8
33 ; CHECK-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds i8, ptr [[DA]], i8 1
34 ; CHECK-NEXT: store i8 0, ptr [[ARRAYIDX1]], align 8
35 ; CHECK-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds i8, ptr [[DA]], i8 2
36 ; CHECK-NEXT: ret void
39 store i8 0, ptr %da, align 8
40 %arrayidx1 = getelementptr inbounds i8, ptr %da, i8 1
41 store i8 0, ptr %arrayidx1, align 8
42 %arrayidx2 = getelementptr inbounds i8, ptr %da, i8 2
45 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: