1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
2 ; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
4 define void @test(double %v) {
5 ; CHECK-LABEL: define void @test(
6 ; CHECK-SAME: double [[V:%.*]]) {
7 ; CHECK-NEXT: [[ENTRY:.*]]:
8 ; CHECK-NEXT: [[TMP0:%.*]] = insertelement <2 x double> <double 0.000000e+00, double poison>, double [[V]], i32 1
9 ; CHECK-NEXT: [[TMP1:%.*]] = fmul <2 x double> zeroinitializer, [[TMP0]]
10 ; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <2 x double> [[TMP1]], <2 x double> poison, <2 x i32> <i32 1, i32 0>
11 ; CHECK-NEXT: br label %[[LOOP:.*]]
13 ; CHECK-NEXT: [[T50_02:%.*]] = phi double [ 0.000000e+00, %[[ENTRY]] ], [ [[TMP8:%.*]], %[[LOOP]] ]
14 ; CHECK-NEXT: [[TMP3:%.*]] = phi <2 x double> [ zeroinitializer, %[[ENTRY]] ], [ [[TMP10:%.*]], %[[LOOP]] ]
15 ; CHECK-NEXT: [[TMP4:%.*]] = fmul <2 x double> [[TMP3]], [[TMP2]]
16 ; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x double> [[TMP4]], i32 0
17 ; CHECK-NEXT: [[TMP6:%.*]] = extractelement <2 x double> [[TMP4]], i32 1
18 ; CHECK-NEXT: [[TMP7:%.*]] = fadd double [[TMP6]], [[TMP5]]
19 ; CHECK-NEXT: [[TMP8]] = fadd double [[TMP7]], [[V]]
20 ; CHECK-NEXT: [[TMP9:%.*]] = fmul <2 x double> zeroinitializer, [[TMP1]]
21 ; CHECK-NEXT: [[TMP10]] = fadd <2 x double> zeroinitializer, [[TMP9]]
22 ; CHECK-NEXT: br label %[[LOOP]]
25 %mul.3 = fmul double 0.000000e+00, %v
26 %mul.4 = fmul double 0.000000e+00, 0.000000e+00
30 %t48.0 = phi double [ 0.000000e+00, %entry ], [ %5, %loop ]
31 %t50.02 = phi double [ 0.000000e+00, %entry ], [ %3, %loop ]
32 %t52.0 = phi double [ 0.000000e+00, %entry ], [ %7, %loop ]
33 %0 = fmul double %t52.0, %mul.3
34 %1 = fmul double %t48.0, %mul.4
35 %2 = fadd double %1, %0
36 %3 = fadd double %2, %v
37 %4 = fmul double 0.000000e+00, %mul.3
38 %5 = fadd double 0.000000e+00, %4
39 %6 = fmul double 0.000000e+00, %mul.4
40 %7 = fadd double 0.000000e+00, %6