1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=slp-vectorizer -mtriple x86_64-unknown-linux-gnu < %s | FileCheck %s
4 define <4 x double> @test(ptr %p2, double %i1754, double %i1781, double %i1778) {
7 ; CHECK-NEXT: [[I1771:%.*]] = getelementptr inbounds double, ptr [[P2:%.*]], i64 54
8 ; CHECK-NEXT: [[I1772:%.*]] = load double, ptr [[I1771]], align 8
9 ; CHECK-NEXT: [[I1795:%.*]] = getelementptr inbounds double, ptr [[P2]], i64 55
10 ; CHECK-NEXT: [[I1796:%.*]] = load double, ptr [[I1795]], align 8
11 ; CHECK-NEXT: [[I1797:%.*]] = fmul fast double [[I1796]], [[I1781:%.*]]
12 ; CHECK-NEXT: [[TMP0:%.*]] = insertelement <4 x double> poison, double [[I1754:%.*]], i32 0
13 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <4 x double> [[TMP0]], double [[I1778:%.*]], i32 1
14 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <4 x double> [[TMP1]], double [[I1781]], i32 2
15 ; CHECK-NEXT: [[TMP3:%.*]] = insertelement <4 x double> [[TMP2]], double [[I1772]], i32 3
16 ; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <4 x double> [[TMP3]], <4 x double> poison, <4 x i32> zeroinitializer
17 ; CHECK-NEXT: [[TMP5:%.*]] = fmul fast <4 x double> [[TMP3]], [[TMP4]]
18 ; CHECK-NEXT: [[TMP6:%.*]] = insertelement <4 x double> <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double poison>, double [[I1797]], i32 3
19 ; CHECK-NEXT: [[TMP7:%.*]] = fadd fast <4 x double> [[TMP5]], [[TMP6]]
20 ; CHECK-NEXT: ret <4 x double> [[TMP7]]
23 %i1771 = getelementptr inbounds double, ptr %p2, i64 54
24 %i1772 = load double, ptr %i1771, align 8
25 %i1773 = fmul fast double %i1772, %i1754
26 %i1782 = fmul fast double %i1754, %i1754
27 %i1783 = fadd fast double %i1782, 1.000000e+00
28 %i1787 = fmul fast double %i1778, %i1754
29 %i1788 = fadd fast double %i1787, 1.000000e+00
30 %i1792 = fmul fast double %i1754, %i1781
31 %i1793 = fadd fast double %i1792, 1.000000e+00
32 %i1795 = getelementptr inbounds double, ptr %p2, i64 55
33 %i1796 = load double, ptr %i1795, align 8
34 %i1797 = fmul fast double %i1796, %i1781
35 %i1798 = fadd fast double %i1773, %i1797
36 %i1976 = insertelement <4 x double> zeroinitializer, double %i1783, i64 0
37 %i1982 = insertelement <4 x double> %i1976, double %i1788, i64 1
38 %i1988 = insertelement <4 x double> %i1982, double %i1793, i64 2
39 %i1994 = insertelement <4 x double> %i1988, double %i1798, i64 3
40 ret <4 x double> %i1994