1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt < %s -basic-aa -slp-vectorizer -dce -S -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7 | FileCheck %s 3 4target 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" 5target triple = "x86_64-apple-macosx10.8.0" 6 7%struct.Ray.5.11.53.113.119.137.149.185.329.389.416 = type { %struct.Vec.0.6.48.108.114.132.144.180.324.384.414, %struct.Vec.0.6.48.108.114.132.144.180.324.384.414 } 8%struct.Vec.0.6.48.108.114.132.144.180.324.384.414 = type { double, double, double } 9 10; Function Attrs: ssp uwtable 11define void @main() #0 { 12; CHECK-LABEL: @main( 13; CHECK-NEXT: entry: 14; CHECK-NEXT: br i1 undef, label [[COND_TRUE:%.*]], label [[COND_END:%.*]] 15; CHECK: cond.true: 16; CHECK-NEXT: unreachable 17; CHECK: cond.end: 18; CHECK-NEXT: br label [[INVOKE_CONT:%.*]] 19; CHECK: invoke.cont: 20; CHECK-NEXT: br i1 undef, label [[ARRAYCTOR_CONT:%.*]], label [[INVOKE_CONT]] 21; CHECK: arrayctor.cont: 22; CHECK-NEXT: [[AGG_TMP99208_SROA_0_0_IDX:%.*]] = getelementptr inbounds [[STRUCT_RAY_5_11_53_113_119_137_149_185_329_389_416:%.*]], %struct.Ray.5.11.53.113.119.137.149.185.329.389.416* undef, i64 0, i32 0, i32 0 23; CHECK-NEXT: [[AGG_TMP101211_SROA_0_0_IDX:%.*]] = getelementptr inbounds [[STRUCT_RAY_5_11_53_113_119_137_149_185_329_389_416]], %struct.Ray.5.11.53.113.119.137.149.185.329.389.416* undef, i64 0, i32 1, i32 0 24; CHECK-NEXT: br label [[FOR_COND36_PREHEADER:%.*]] 25; CHECK: for.cond36.preheader: 26; CHECK-NEXT: br i1 undef, label [[FOR_BODY42_LR_PH_US:%.*]], label [[_Z5CLAMPD_EXIT_1:%.*]] 27; CHECK: cond.false51.us: 28; CHECK-NEXT: unreachable 29; CHECK: cond.true48.us: 30; CHECK-NEXT: br i1 undef, label [[COND_TRUE63_US:%.*]], label [[COND_FALSE66_US:%.*]] 31; CHECK: cond.false66.us: 32; CHECK-NEXT: [[ADD_I276_US:%.*]] = fadd double 0.000000e+00, undef 33; CHECK-NEXT: [[TMP0:%.*]] = insertelement <2 x double> undef, double [[ADD_I276_US]], i32 0 34; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> [[TMP0]], double undef, i32 1 35; CHECK-NEXT: [[TMP2:%.*]] = fadd <2 x double> [[TMP1]], <double 0.000000e+00, double 0xBFA5CC2D1960285F> 36; CHECK-NEXT: [[TMP3:%.*]] = fmul <2 x double> [[TMP2]], <double 1.400000e+02, double 1.400000e+02> 37; CHECK-NEXT: [[TMP4:%.*]] = fadd <2 x double> [[TMP3]], <double 5.000000e+01, double 5.200000e+01> 38; CHECK-NEXT: [[TMP5:%.*]] = fmul <2 x double> undef, [[TMP2]] 39; CHECK-NEXT: [[TMP6:%.*]] = bitcast double* [[AGG_TMP99208_SROA_0_0_IDX]] to <2 x double>* 40; CHECK-NEXT: store <2 x double> [[TMP4]], <2 x double>* [[TMP6]], align 8 41; CHECK-NEXT: [[TMP7:%.*]] = bitcast double* [[AGG_TMP101211_SROA_0_0_IDX]] to <2 x double>* 42; CHECK-NEXT: store <2 x double> [[TMP5]], <2 x double>* [[TMP7]], align 8 43; CHECK-NEXT: unreachable 44; CHECK: cond.true63.us: 45; CHECK-NEXT: unreachable 46; CHECK: for.body42.lr.ph.us: 47; CHECK-NEXT: br i1 undef, label [[COND_TRUE48_US:%.*]], label [[COND_FALSE51_US:%.*]] 48; CHECK: _Z5clampd.exit.1: 49; CHECK-NEXT: br label [[FOR_COND36_PREHEADER]] 50; 51entry: 52 br i1 undef, label %cond.true, label %cond.end 53 54cond.true: ; preds = %entry 55 unreachable 56 57cond.end: ; preds = %entry 58 br label %invoke.cont 59 60invoke.cont: ; preds = %invoke.cont, %cond.end 61 br i1 undef, label %arrayctor.cont, label %invoke.cont 62 63arrayctor.cont: ; preds = %invoke.cont 64 %agg.tmp99208.sroa.0.0.idx = getelementptr inbounds %struct.Ray.5.11.53.113.119.137.149.185.329.389.416, %struct.Ray.5.11.53.113.119.137.149.185.329.389.416* undef, i64 0, i32 0, i32 0 65 %agg.tmp99208.sroa.1.8.idx388 = getelementptr inbounds %struct.Ray.5.11.53.113.119.137.149.185.329.389.416, %struct.Ray.5.11.53.113.119.137.149.185.329.389.416* undef, i64 0, i32 0, i32 1 66 %agg.tmp101211.sroa.0.0.idx = getelementptr inbounds %struct.Ray.5.11.53.113.119.137.149.185.329.389.416, %struct.Ray.5.11.53.113.119.137.149.185.329.389.416* undef, i64 0, i32 1, i32 0 67 %agg.tmp101211.sroa.1.8.idx390 = getelementptr inbounds %struct.Ray.5.11.53.113.119.137.149.185.329.389.416, %struct.Ray.5.11.53.113.119.137.149.185.329.389.416* undef, i64 0, i32 1, i32 1 68 br label %for.cond36.preheader 69 70for.cond36.preheader: ; preds = %_Z5clampd.exit.1, %arrayctor.cont 71 br i1 undef, label %for.body42.lr.ph.us, label %_Z5clampd.exit.1 72 73cond.false51.us: ; preds = %for.body42.lr.ph.us 74 unreachable 75 76cond.true48.us: ; preds = %for.body42.lr.ph.us 77 br i1 undef, label %cond.true63.us, label %cond.false66.us 78 79cond.false66.us: ; preds = %cond.true48.us 80 %add.i276.us = fadd double 0.000000e+00, undef 81 %add.i264.us = fadd double %add.i276.us, 0.000000e+00 82 %add4.i267.us = fadd double undef, 0xBFA5CC2D1960285F 83 %mul.i254.us = fmul double %add.i264.us, 1.400000e+02 84 %mul2.i256.us = fmul double %add4.i267.us, 1.400000e+02 85 %add.i243.us = fadd double %mul.i254.us, 5.000000e+01 86 %add4.i246.us = fadd double %mul2.i256.us, 5.200000e+01 87 %mul.i.i.us = fmul double undef, %add.i264.us 88 %mul2.i.i.us = fmul double undef, %add4.i267.us 89 store double %add.i243.us, double* %agg.tmp99208.sroa.0.0.idx, align 8 90 store double %add4.i246.us, double* %agg.tmp99208.sroa.1.8.idx388, align 8 91 store double %mul.i.i.us, double* %agg.tmp101211.sroa.0.0.idx, align 8 92 store double %mul2.i.i.us, double* %agg.tmp101211.sroa.1.8.idx390, align 8 93 unreachable 94 95cond.true63.us: ; preds = %cond.true48.us 96 unreachable 97 98for.body42.lr.ph.us: ; preds = %for.cond36.preheader 99 br i1 undef, label %cond.true48.us, label %cond.false51.us 100 101_Z5clampd.exit.1: ; preds = %for.cond36.preheader 102 br label %for.cond36.preheader 103} 104 105 106%struct.Ray.5.11.53.95.137.191.197.203.239.257.263.269.275.281.287.293.383.437.443.455.461.599.601 = type { %struct.Vec.0.6.48.90.132.186.192.198.234.252.258.264.270.276.282.288.378.432.438.450.456.594.600, %struct.Vec.0.6.48.90.132.186.192.198.234.252.258.264.270.276.282.288.378.432.438.450.456.594.600 } 107%struct.Vec.0.6.48.90.132.186.192.198.234.252.258.264.270.276.282.288.378.432.438.450.456.594.600 = type { double, double, double } 108 109define void @_Z8radianceRK3RayiPt() #0 { 110; CHECK-LABEL: @_Z8radianceRK3RayiPt( 111; CHECK-NEXT: entry: 112; CHECK-NEXT: br i1 undef, label [[IF_THEN78:%.*]], label [[IF_THEN38:%.*]] 113; CHECK: if.then38: 114; CHECK-NEXT: [[TMP0:%.*]] = insertelement <2 x double> undef, double undef, i32 1 115; CHECK-NEXT: [[TMP1:%.*]] = fmul <2 x double> undef, [[TMP0]] 116; CHECK-NEXT: [[TMP2:%.*]] = fsub <2 x double> undef, [[TMP1]] 117; CHECK-NEXT: [[TMP3:%.*]] = fmul <2 x double> undef, [[TMP2]] 118; CHECK-NEXT: [[TMP4:%.*]] = fmul <2 x double> undef, [[TMP3]] 119; CHECK-NEXT: [[TMP5:%.*]] = fadd <2 x double> undef, [[TMP4]] 120; CHECK-NEXT: [[TMP6:%.*]] = fadd <2 x double> undef, [[TMP5]] 121; CHECK-NEXT: [[TMP7:%.*]] = fmul <2 x double> undef, [[TMP6]] 122; CHECK-NEXT: [[AGG_TMP74663_SROA_0_0_IDX:%.*]] = getelementptr inbounds [[STRUCT_RAY_5_11_53_95_137_191_197_203_239_257_263_269_275_281_287_293_383_437_443_455_461_599_601:%.*]], %struct.Ray.5.11.53.95.137.191.197.203.239.257.263.269.275.281.287.293.383.437.443.455.461.599.601* undef, i64 0, i32 1, i32 0 123; CHECK-NEXT: [[TMP8:%.*]] = bitcast double* [[AGG_TMP74663_SROA_0_0_IDX]] to <2 x double>* 124; CHECK-NEXT: store <2 x double> [[TMP7]], <2 x double>* [[TMP8]], align 8 125; CHECK-NEXT: br label [[RETURN:%.*]] 126; CHECK: if.then78: 127; CHECK-NEXT: br label [[RETURN]] 128; CHECK: return: 129; CHECK-NEXT: ret void 130; 131entry: 132 br i1 undef, label %if.then78, label %if.then38 133 134if.then38: ; preds = %entry 135 %mul.i.i790 = fmul double undef, undef 136 %mul3.i.i792 = fmul double undef, undef 137 %mul.i764 = fmul double undef, %mul3.i.i792 138 %mul4.i767 = fmul double undef, undef 139 %sub.i768 = fsub double %mul.i764, %mul4.i767 140 %mul6.i770 = fmul double undef, %mul.i.i790 141 %mul9.i772 = fmul double undef, %mul3.i.i792 142 %sub10.i773 = fsub double %mul6.i770, %mul9.i772 143 %mul.i736 = fmul double undef, %sub.i768 144 %mul2.i738 = fmul double undef, %sub10.i773 145 %mul.i727 = fmul double undef, %mul.i736 146 %mul2.i729 = fmul double undef, %mul2.i738 147 %add.i716 = fadd double undef, %mul.i727 148 %add4.i719 = fadd double undef, %mul2.i729 149 %add.i695 = fadd double undef, %add.i716 150 %add4.i698 = fadd double undef, %add4.i719 151 %mul.i.i679 = fmul double undef, %add.i695 152 %mul2.i.i680 = fmul double undef, %add4.i698 153 %agg.tmp74663.sroa.0.0.idx = getelementptr inbounds %struct.Ray.5.11.53.95.137.191.197.203.239.257.263.269.275.281.287.293.383.437.443.455.461.599.601, %struct.Ray.5.11.53.95.137.191.197.203.239.257.263.269.275.281.287.293.383.437.443.455.461.599.601* undef, i64 0, i32 1, i32 0 154 store double %mul.i.i679, double* %agg.tmp74663.sroa.0.0.idx, align 8 155 %agg.tmp74663.sroa.1.8.idx943 = getelementptr inbounds %struct.Ray.5.11.53.95.137.191.197.203.239.257.263.269.275.281.287.293.383.437.443.455.461.599.601, %struct.Ray.5.11.53.95.137.191.197.203.239.257.263.269.275.281.287.293.383.437.443.455.461.599.601* undef, i64 0, i32 1, i32 1 156 store double %mul2.i.i680, double* %agg.tmp74663.sroa.1.8.idx943, align 8 157 br label %return 158 159if.then78: ; preds = %entry 160 br label %return 161 162return: ; preds = %if.then78, %if.then38 163 ret void 164} 165 166attributes #0 = { ssp uwtable "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" } 167