1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=slp-vectorizer -S -mtriple=aarch64-w32-windows-gnu | FileCheck %s
7 ; CHECK-NEXT: br label [[FOR_COND15_PREHEADER:%.*]]
8 ; CHECK: for.cond15.preheader:
9 ; CHECK-NEXT: br label [[IF_END:%.*]]
11 ; CHECK-NEXT: br label [[IF_END_1:%.*]]
13 ; CHECK-NEXT: br label [[FOR_COND15:%.*]]
15 ; CHECK-NEXT: switch i32 undef, label [[DO_BODY:%.*]] [
16 ; CHECK-NEXT: i32 0, label [[SW_BB:%.*]]
17 ; CHECK-NEXT: i32 1, label [[SW_BB195:%.*]]
20 ; CHECK-NEXT: [[ARRAYIDX43:%.*]] = getelementptr inbounds [4 x [2 x double]], ptr undef, i32 0, i64 1, i64 0
21 ; CHECK-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr [[ARRAYIDX43]], align 8
22 ; CHECK-NEXT: [[TMP2:%.*]] = fmul <4 x double> [[TMP1]], <double 0x7FF8000000000000, double 0x7FF8000000000000, double 0x7FF8000000000000, double 0x7FF8000000000000>
23 ; CHECK-NEXT: [[TMP3:%.*]] = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> undef, <4 x double> zeroinitializer, <4 x double> [[TMP2]])
24 ; CHECK-NEXT: br label [[SW_EPILOG:%.*]]
26 ; CHECK-NEXT: br label [[SW_EPILOG]]
28 ; CHECK-NEXT: unreachable
30 ; CHECK-NEXT: [[TMP4:%.*]] = phi <4 x double> [ undef, [[SW_BB195]] ], [ [[TMP3]], [[SW_BB]] ]
31 ; CHECK-NEXT: ret i32 undef
33 ; CHECK-NEXT: br label [[FOR_COND15_1:%.*]]
34 ; CHECK: for.cond15.1:
35 ; CHECK-NEXT: br i1 undef, label [[FOR_END39:%.*]], label [[FOR_COND15_PREHEADER]]
38 %conv = sitofp i32 undef to double
39 %conv2 = sitofp i32 undef to double
40 br label %for.cond15.preheader
42 for.cond15.preheader: ; preds = %for.cond15.1, %entry
45 for.cond15: ; preds = %if.end
48 if.end: ; preds = %for.cond15.preheader
51 for.end39: ; preds = %for.cond15.1
52 switch i32 undef, label %do.body [
54 i32 1, label %sw.bb195
57 sw.bb: ; preds = %for.end39
58 %arrayidx43 = getelementptr inbounds [4 x [2 x double]], ptr undef, i32 0, i64 1, i64 0
59 %0 = load double, ptr %arrayidx43, align 8
60 %arrayidx45 = getelementptr inbounds [4 x [2 x double]], ptr undef, i32 0, i64 2, i64 0
61 %1 = load double, ptr %arrayidx45, align 8
62 %arrayidx51 = getelementptr inbounds [4 x [2 x double]], ptr undef, i32 0, i64 2, i64 1
63 %2 = load double, ptr %arrayidx51, align 8
64 %arrayidx58 = getelementptr inbounds [4 x [2 x double]], ptr undef, i32 0, i64 1, i64 1
65 %3 = load double, ptr %arrayidx58, align 8
66 %mul = fmul double undef, %conv2
67 %mul109 = fmul double undef, %conv
68 %mul143 = fmul double %0, %mul
69 %4 = call double @llvm.fmuladd.f64(double undef, double %conv2, double %mul143)
70 %mul154 = fmul double %1, %mul109
71 %5 = call double @llvm.fmuladd.f64(double undef, double %conv, double %mul154)
72 %mul172 = fmul double %3, %mul
73 %6 = call double @llvm.fmuladd.f64(double undef, double %conv2, double %mul172)
74 %mul183 = fmul double %2, %mul109
75 %7 = call double @llvm.fmuladd.f64(double undef, double %conv, double %mul183)
78 sw.bb195: ; preds = %for.end39
81 do.body: ; preds = %for.end39
84 sw.epilog: ; preds = %sw.bb195, %sw.bb
85 %x4.0 = phi double [ undef, %sw.bb195 ], [ %7, %sw.bb ]
86 %x3.0 = phi double [ undef, %sw.bb195 ], [ %6, %sw.bb ]
87 %x1.0 = phi double [ undef, %sw.bb195 ], [ %5, %sw.bb ]
88 %x0.0 = phi double [ undef, %sw.bb195 ], [ %4, %sw.bb ]
91 if.end.1: ; preds = %for.cond15
92 br label %for.cond15.1
94 for.cond15.1: ; preds = %if.end.1
95 br i1 undef, label %for.end39, label %for.cond15.preheader
98 declare double @llvm.fmuladd.f64(double, double, double)