1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S < %s -slp-vectorizer -slp-max-reg-size=128 -slp-min-reg-size=128 | FileCheck %s
4 declare void @llvm.sideeffect()
6 ; SLP vectorization across a @llvm.sideeffect.
8 define void @test(float* %p) {
10 ; CHECK-NEXT: [[P0:%.*]] = getelementptr float, float* [[P:%.*]], i64 0
11 ; CHECK-NEXT: [[P1:%.*]] = getelementptr float, float* [[P]], i64 1
12 ; CHECK-NEXT: [[P2:%.*]] = getelementptr float, float* [[P]], i64 2
13 ; CHECK-NEXT: [[P3:%.*]] = getelementptr float, float* [[P]], i64 3
14 ; CHECK-NEXT: call void @llvm.sideeffect()
15 ; CHECK-NEXT: [[TMP1:%.*]] = bitcast float* [[P0]] to <4 x float>*
16 ; CHECK-NEXT: [[TMP2:%.*]] = load <4 x float>, <4 x float>* [[TMP1]], align 4
17 ; CHECK-NEXT: call void @llvm.sideeffect()
18 ; CHECK-NEXT: [[TMP3:%.*]] = bitcast float* [[P0]] to <4 x float>*
19 ; CHECK-NEXT: store <4 x float> [[TMP2]], <4 x float>* [[TMP3]], align 4
20 ; CHECK-NEXT: ret void
22 %p0 = getelementptr float, float* %p, i64 0
23 %p1 = getelementptr float, float* %p, i64 1
24 %p2 = getelementptr float, float* %p, i64 2
25 %p3 = getelementptr float, float* %p, i64 3
26 %l0 = load float, float* %p0
27 %l1 = load float, float* %p1
28 %l2 = load float, float* %p2
29 call void @llvm.sideeffect()
30 %l3 = load float, float* %p3
31 store float %l0, float* %p0
32 call void @llvm.sideeffect()
33 store float %l1, float* %p1
34 store float %l2, float* %p2
35 store float %l3, float* %p3