1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2 ; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-linux-gnu < %s | FileCheck %s
4 define void @test(ptr noalias %arg, ptr noalias %arg1, ptr %arg2) {
5 ; CHECK-LABEL: define void @test(
6 ; CHECK-SAME: ptr noalias [[ARG:%.*]], ptr noalias [[ARG1:%.*]], ptr [[ARG2:%.*]]) {
8 ; CHECK-NEXT: [[TMP_I_I:%.*]] = getelementptr i8, ptr [[ARG1]], i64 24
9 ; CHECK-NEXT: [[TMP_I_I4:%.*]] = getelementptr i8, ptr [[ARG]], i64 24
10 ; CHECK-NEXT: [[TMP0:%.*]] = load <4 x float>, ptr [[TMP_I_I]], align 8
11 ; CHECK-NEXT: [[TMP1:%.*]] = extractelement <4 x float> [[TMP0]], i32 1
12 ; CHECK-NEXT: store float [[TMP1]], ptr [[ARG2]], align 4
13 ; CHECK-NEXT: [[TMP2:%.*]] = fcmp olt <4 x float> [[TMP0]], zeroinitializer
14 ; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x float> [[TMP0]], <4 x float> poison, <4 x i32> <i32 2, i32 3, i32 2, i32 3>
15 ; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <4 x float> [[TMP0]], <4 x float> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
16 ; CHECK-NEXT: [[TMP5:%.*]] = select <4 x i1> [[TMP2]], <4 x float> [[TMP3]], <4 x float> [[TMP4]]
17 ; CHECK-NEXT: [[TMP6:%.*]] = shufflevector <4 x float> [[TMP5]], <4 x float> poison, <4 x i32> <i32 2, i32 0, i32 3, i32 1>
18 ; CHECK-NEXT: store <4 x float> [[TMP6]], ptr [[TMP_I_I4]], align 8
19 ; CHECK-NEXT: ret void
22 %tmp.i.i = getelementptr i8, ptr %arg1, i64 24
23 %tmp1.i.i = load float, ptr %tmp.i.i, align 8
24 %tmp.i.i2 = getelementptr i8, ptr %arg1, i64 32
25 %tmp1.i.i3 = load float, ptr %tmp.i.i2, align 8
26 %tmp1.i.i.i = fcmp olt float %tmp1.i.i3, 0.000000e+00
27 %tmp9 = select i1 %tmp1.i.i.i, float %tmp1.i.i3, float %tmp1.i.i
28 %tmp.i.i4 = getelementptr i8, ptr %arg, i64 24
29 store float %tmp9, ptr %tmp.i.i4, align 8
30 %tmp1.i.i.i10 = fcmp olt float %tmp1.i.i, 0.000000e+00
31 %tmp13 = select i1 %tmp1.i.i.i10, float %tmp1.i.i3, float %tmp1.i.i
32 %tmp.i.i12 = getelementptr i8, ptr %arg, i64 28
33 store float %tmp13, ptr %tmp.i.i12, align 4
34 %tmp.i.i13 = getelementptr i8, ptr %arg1, i64 28
35 %tmp1.i.i14 = load float, ptr %tmp.i.i13, align 4
36 %tmp.i.i15 = getelementptr i8, ptr %arg1, i64 36
37 %tmp1.i.i16 = load float, ptr %tmp.i.i15, align 4
38 %tmp1.i.i.i18 = fcmp olt float %tmp1.i.i16, 0.000000e+00
39 %tmp17 = select i1 %tmp1.i.i.i18, float %tmp1.i.i16, float %tmp1.i.i14
40 %tmp.i.i20 = getelementptr i8, ptr %arg, i64 32
41 store float %tmp17, ptr %tmp.i.i20, align 8
42 store float %tmp1.i.i14, ptr %arg2, align 4
43 %tmp1.i.i.i24 = fcmp olt float %tmp1.i.i14, 0.000000e+00
44 %tmp20 = select i1 %tmp1.i.i.i24, float %tmp1.i.i16, float %tmp1.i.i14
45 %tmp.i.i26 = getelementptr i8, ptr %arg, i64 36
46 store float %tmp20, ptr %tmp.i.i26, align 4