1 ; RUN: opt -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7-avx -bb-vectorize -S < %s | FileCheck %s 2 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" 3 target triple = "x86_64-unknown-linux-gnu" 4 5 %class.QBezier.15 = type { double, double, double, double, double, double, double, double } 6 7 ; Function Attrs: nounwind 8 declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) #0 9 10 ; Function Attrs: uwtable 11 declare fastcc void @_ZL12printQBezier7QBezier(%class.QBezier.15* byval nocapture readonly align 8) #1 12 13 ; Function Attrs: nounwind 14 declare void @llvm.lifetime.start(i64, i8* nocapture) #0 15 16 ; Function Attrs: nounwind 17 declare void @llvm.lifetime.end(i64, i8* nocapture) #0 18 19 define void @main_arrayctor.cont([10 x %class.QBezier.15]* %beziers, %class.QBezier.15* %agg.tmp.i, %class.QBezier.15* %agg.tmp55.i, %class.QBezier.15* %agg.tmp56.i) { 20 newFuncRoot: 21 br label %arrayctor.cont 22 23 arrayctor.cont.ret.exitStub: ; preds = %arrayctor.cont 24 ret void 25 26 ; CHECK-LABEL: @main_arrayctor.cont 27 ; CHECK: <2 x double> 28 ; CHECK: @_ZL12printQBezier7QBezier 29 ; CHECK: store double %mul8.i, double* %x3.i, align 16 30 ; CHECK: load double* %x3.i, align 16 31 ; CHECK: ret 32 33 arrayctor.cont: ; preds = %newFuncRoot 34 %ref.tmp.sroa.0.0.idx = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 0 35 store double 1.000000e+01, double* %ref.tmp.sroa.0.0.idx, align 16 36 %ref.tmp.sroa.2.0.idx1 = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 1 37 store double 2.000000e+01, double* %ref.tmp.sroa.2.0.idx1, align 8 38 %ref.tmp.sroa.3.0.idx2 = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 2 39 store double 3.000000e+01, double* %ref.tmp.sroa.3.0.idx2, align 16 40 %ref.tmp.sroa.4.0.idx3 = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 3 41 store double 4.000000e+01, double* %ref.tmp.sroa.4.0.idx3, align 8 42 %ref.tmp.sroa.5.0.idx4 = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 4 43 store double 5.000000e+01, double* %ref.tmp.sroa.5.0.idx4, align 16 44 %ref.tmp.sroa.6.0.idx5 = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 5 45 store double 6.000000e+01, double* %ref.tmp.sroa.6.0.idx5, align 8 46 %ref.tmp.sroa.7.0.idx6 = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 6 47 store double 7.000000e+01, double* %ref.tmp.sroa.7.0.idx6, align 16 48 %ref.tmp.sroa.8.0.idx7 = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 7 49 store double 8.000000e+01, double* %ref.tmp.sroa.8.0.idx7, align 8 50 %add.ptr = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1 51 %v0 = bitcast %class.QBezier.15* %agg.tmp.i to i8* 52 call void @llvm.lifetime.start(i64 64, i8* %v0) 53 %v1 = bitcast %class.QBezier.15* %agg.tmp55.i to i8* 54 call void @llvm.lifetime.start(i64 64, i8* %v1) 55 %v2 = bitcast %class.QBezier.15* %agg.tmp56.i to i8* 56 call void @llvm.lifetime.start(i64 64, i8* %v2) 57 %v3 = bitcast [10 x %class.QBezier.15]* %beziers to i8* 58 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %v0, i8* %v3, i64 64, i32 8, i1 false) 59 call fastcc void @_ZL12printQBezier7QBezier(%class.QBezier.15* byval align 8 %agg.tmp.i) 60 %x2.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 2 61 %v4 = load double* %x2.i, align 16 62 %x3.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 4 63 %v5 = load double* %x3.i, align 16 64 %add.i = fadd double %v4, %v5 65 %mul.i = fmul double 5.000000e-01, %add.i 66 %x1.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 0 67 %v6 = load double* %x1.i, align 16 68 %add3.i = fadd double %v4, %v6 69 %mul4.i = fmul double 5.000000e-01, %add3.i 70 %x25.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1, i32 2 71 store double %mul4.i, double* %x25.i, align 16 72 %v7 = load double* %x3.i, align 16 73 %x4.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 6 74 %v8 = load double* %x4.i, align 16 75 %add7.i = fadd double %v7, %v8 76 %mul8.i = fmul double 5.000000e-01, %add7.i 77 store double %mul8.i, double* %x3.i, align 16 78 %v9 = load double* %x1.i, align 16 79 %x111.i = getelementptr inbounds %class.QBezier.15* %add.ptr, i64 0, i32 0 80 store double %v9, double* %x111.i, align 16 81 %v10 = load double* %x25.i, align 16 82 %add15.i = fadd double %mul.i, %v10 83 %mul16.i = fmul double 5.000000e-01, %add15.i 84 %x317.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1, i32 4 85 store double %mul16.i, double* %x317.i, align 16 86 %v11 = load double* %x3.i, align 16 87 %add19.i = fadd double %mul.i, %v11 88 %mul20.i = fmul double 5.000000e-01, %add19.i 89 store double %mul20.i, double* %x2.i, align 16 90 %v12 = load double* %x317.i, align 16 91 %add24.i = fadd double %v12, %mul20.i 92 %mul25.i = fmul double 5.000000e-01, %add24.i 93 store double %mul25.i, double* %x1.i, align 16 94 %x427.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1, i32 6 95 store double %mul25.i, double* %x427.i, align 16 96 %y2.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 3 97 %v13 = load double* %y2.i, align 8 98 %y3.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 5 99 %v14 = load double* %y3.i, align 8 100 %add28.i = fadd double %v13, %v14 101 %div.i = fmul double 5.000000e-01, %add28.i 102 %y1.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 1 103 %v15 = load double* %y1.i, align 8 104 %add30.i = fadd double %v13, %v15 105 %mul31.i = fmul double 5.000000e-01, %add30.i 106 %y232.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1, i32 3 107 store double %mul31.i, double* %y232.i, align 8 108 %v16 = load double* %y3.i, align 8 109 %y4.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 0, i32 7 110 %v17 = load double* %y4.i, align 8 111 %add34.i = fadd double %v16, %v17 112 %mul35.i = fmul double 5.000000e-01, %add34.i 113 store double %mul35.i, double* %y3.i, align 8 114 %v18 = load double* %y1.i, align 8 115 %y138.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1, i32 1 116 store double %v18, double* %y138.i, align 8 117 %v19 = load double* %y232.i, align 8 118 %add42.i = fadd double %div.i, %v19 119 %mul43.i = fmul double 5.000000e-01, %add42.i 120 %y344.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1, i32 5 121 store double %mul43.i, double* %y344.i, align 8 122 %v20 = load double* %y3.i, align 8 123 %add46.i = fadd double %div.i, %v20 124 %mul47.i = fmul double 5.000000e-01, %add46.i 125 store double %mul47.i, double* %y2.i, align 8 126 %v21 = load double* %y344.i, align 8 127 %add51.i = fadd double %v21, %mul47.i 128 %mul52.i = fmul double 5.000000e-01, %add51.i 129 store double %mul52.i, double* %y1.i, align 8 130 %y454.i = getelementptr inbounds [10 x %class.QBezier.15]* %beziers, i64 0, i64 1, i32 7 131 store double %mul52.i, double* %y454.i, align 8 132 %v22 = bitcast %class.QBezier.15* %add.ptr to i8* 133 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %v1, i8* %v22, i64 64, i32 8, i1 false) 134 call fastcc void @_ZL12printQBezier7QBezier(%class.QBezier.15* byval align 8 %agg.tmp55.i) 135 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %v2, i8* %v3, i64 64, i32 8, i1 false) 136 call fastcc void @_ZL12printQBezier7QBezier(%class.QBezier.15* byval align 8 %agg.tmp56.i) 137 call void @llvm.lifetime.end(i64 64, i8* %v0) 138 call void @llvm.lifetime.end(i64 64, i8* %v1) 139 call void @llvm.lifetime.end(i64 64, i8* %v2) 140 br label %arrayctor.cont.ret.exitStub 141 } 142 143 attributes #0 = { nounwind } 144 attributes #1 = { uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } 145