1 ; RUN: opt -S < %s -load-store-vectorizer | FileCheck %s
2 ; RUN: opt -S < %s -passes='function(load-store-vectorizer)' | FileCheck %s
4 declare void @llvm.sideeffect()
6 ; load-store vectorization across a @llvm.sideeffect.
9 ; CHECK: load <4 x float>
10 ; CHECK: store <4 x float>
11 define void @test(float* %p) {
12 %p0 = getelementptr float, float* %p, i64 0
13 %p1 = getelementptr float, float* %p, i64 1
14 %p2 = getelementptr float, float* %p, i64 2
15 %p3 = getelementptr float, float* %p, i64 3
16 %l0 = load float, float* %p0, align 16
17 %l1 = load float, float* %p1
18 %l2 = load float, float* %p2
19 call void @llvm.sideeffect()
20 %l3 = load float, float* %p3
21 store float %l0, float* %p0, align 16
22 call void @llvm.sideeffect()
23 store float %l1, float* %p1
24 store float %l2, float* %p2
25 store float %l3, float* %p3