xref: /llvm-project/llvm/test/Transforms/SLPVectorizer/X86/store-constant.ll (revision 85d15bd130930c96533419b0fc2e66d86b84af42)
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2; RUN: opt < %s -S -mtriple=x86_64-- -passes=slp-vectorizer -mcpu=x86-64    | FileCheck %s
3; RUN: opt < %s -S -mtriple=x86_64-- -passes=slp-vectorizer -mcpu=x86-64-v2 | FileCheck %s
4; RUN: opt < %s -S -mtriple=x86_64-- -passes=slp-vectorizer -mcpu=x86-64-v3 | FileCheck %s
5; RUN: opt < %s -S -mtriple=x86_64-- -passes=slp-vectorizer -mcpu=x86-64-v4 | FileCheck %s
6
7@arr = global [20 x i64] zeroinitializer, align 16
8
9define void @PR111126() {
10; CHECK-LABEL: @PR111126(
11; CHECK-NEXT:    store <4 x i64> splat (i64 1), ptr @arr, align 16
12; CHECK-NEXT:    store <4 x i64> splat (i64 1), ptr getelementptr inbounds (i8, ptr @arr, i64 32), align 16
13; CHECK-NEXT:    store <4 x i64> splat (i64 1), ptr getelementptr inbounds (i8, ptr @arr, i64 64), align 16
14; CHECK-NEXT:    store <4 x i64> splat (i64 1), ptr getelementptr inbounds (i8, ptr @arr, i64 96), align 16
15; CHECK-NEXT:    store <4 x i64> splat (i64 1), ptr getelementptr inbounds (i8, ptr @arr, i64 128), align 16
16; CHECK-NEXT:    ret void
17;
18  store i64 1, ptr @arr, align 16
19  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 8), align 8
20  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 16), align 16
21  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 24), align 8
22  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 32), align 16
23  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 40), align 8
24  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 48), align 16
25  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 56), align 8
26  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 64), align 16
27  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 72), align 8
28  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 80), align 16
29  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 88), align 8
30  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 96), align 16
31  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 104), align 8
32  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 112), align 16
33  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 120), align 8
34  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 128), align 16
35  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 136), align 8
36  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 144), align 16
37  store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 152), align 8
38  ret void
39}
40