1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -basic-aa -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]], [4 x [2 x double]]* undef, i32 0, i64 1, i64 0
21 ; CHECK-NEXT: [[ARRAYIDX45:%.*]] = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* undef, i32 0, i64 2, i64 0
22 ; CHECK-NEXT: [[ARRAYIDX51:%.*]] = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* undef, i32 0, i64 2, i64 1
23 ; CHECK-NEXT: [[ARRAYIDX58:%.*]] = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* undef, i32 0, i64 1, i64 1
24 ; CHECK-NEXT: [[TMP0:%.*]] = bitcast double* [[ARRAYIDX43]] to <4 x double>*
25 ; CHECK-NEXT: [[TMP1:%.*]] = load <4 x double>, <4 x double>* [[TMP0]], align 8
26 ; CHECK-NEXT: [[TMP2:%.*]] = fmul <4 x double> [[TMP1]], <double 0x7FF8000000000000, double 0x7FF8000000000000, double 0x7FF8000000000000, double 0x7FF8000000000000>
27 ; CHECK-NEXT: [[TMP3:%.*]] = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> poison, <4 x double> zeroinitializer, <4 x double> [[TMP2]])
28 ; CHECK-NEXT: br label [[SW_EPILOG:%.*]]
30 ; CHECK-NEXT: br label [[SW_EPILOG]]
32 ; CHECK-NEXT: unreachable
34 ; CHECK-NEXT: [[TMP4:%.*]] = phi <4 x double> [ poison, [[SW_BB195]] ], [ [[TMP3]], [[SW_BB]] ]
35 ; CHECK-NEXT: ret i32 undef
37 ; CHECK-NEXT: br label [[FOR_COND15_1:%.*]]
38 ; CHECK: for.cond15.1:
39 ; CHECK-NEXT: br i1 undef, label [[FOR_END39:%.*]], label [[FOR_COND15_PREHEADER]]
42 %conv = sitofp i32 undef to double
43 %conv2 = sitofp i32 undef to double
44 br label %for.cond15.preheader
46 for.cond15.preheader: ; preds = %for.cond15.1, %entry
49 for.cond15: ; preds = %if.end
52 if.end: ; preds = %for.cond15.preheader
55 for.end39: ; preds = %for.cond15.1
56 switch i32 undef, label %do.body [
58 i32 1, label %sw.bb195
61 sw.bb: ; preds = %for.end39
62 %arrayidx43 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* undef, i32 0, i64 1, i64 0
63 %0 = load double, double* %arrayidx43, align 8
64 %arrayidx45 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* undef, i32 0, i64 2, i64 0
65 %1 = load double, double* %arrayidx45, align 8
66 %arrayidx51 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* undef, i32 0, i64 2, i64 1
67 %2 = load double, double* %arrayidx51, align 8
68 %arrayidx58 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* undef, i32 0, i64 1, i64 1
69 %3 = load double, double* %arrayidx58, align 8
70 %mul = fmul double undef, %conv2
71 %mul109 = fmul double undef, %conv
72 %mul143 = fmul double %0, %mul
73 %4 = call double @llvm.fmuladd.f64(double undef, double %conv2, double %mul143)
74 %mul154 = fmul double %1, %mul109
75 %5 = call double @llvm.fmuladd.f64(double undef, double %conv, double %mul154)
76 %mul172 = fmul double %3, %mul
77 %6 = call double @llvm.fmuladd.f64(double undef, double %conv2, double %mul172)
78 %mul183 = fmul double %2, %mul109
79 %7 = call double @llvm.fmuladd.f64(double undef, double %conv, double %mul183)
82 sw.bb195: ; preds = %for.end39
85 do.body: ; preds = %for.end39
88 sw.epilog: ; preds = %sw.bb195, %sw.bb
89 %x4.0 = phi double [ undef, %sw.bb195 ], [ %7, %sw.bb ]
90 %x3.0 = phi double [ undef, %sw.bb195 ], [ %6, %sw.bb ]
91 %x1.0 = phi double [ undef, %sw.bb195 ], [ %5, %sw.bb ]
92 %x0.0 = phi double [ undef, %sw.bb195 ], [ %4, %sw.bb ]
95 if.end.1: ; preds = %for.cond15
96 br label %for.cond15.1
98 for.cond15.1: ; preds = %if.end.1
99 br i1 undef, label %for.end39, label %for.cond15.preheader
102 declare double @llvm.fmuladd.f64(double, double, double)