191 lines · plain
1; RUN: llc < %s2; This test has around 4000 bytes of local variables and it also stresses register allocation3; to force a register scavenging. It tests if the stack is treated as "BigStack" and thus4; spill slots are reserved. If not, reg scavenger will assert.5 6target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n8:16:32-S64"7target triple = "thumbv7--linux-android"8 9%struct.r = type { ptr, [10 x [9 x float]], [10 x [9 x float]], [101 x [9 x float]], [101 x [9 x float]], i32, i32, i32, i32, i32, [8 x [2 x i32]], [432 x float], [432 x i32], [10 x ptr], [10 x ptr], [10 x i32], [10 x i32], [10 x i32], [10 x i32], [10 x i32], [10 x i32], i32, i32, i32, i32, float, float, i32, i32, [9 x float], ptr, float }10 11define void @foo(ptr %this, ptr %srcR, ptr %srcC, ptr %tempPntsX, ptr %tY, ptr %ms, ptr %sX, ptr %sY, ptr dereferenceable(4) %num, ptr %tm, i32 %SR, i32 %lev, ptr %tdata, i32 %siW, i32 %pyw, i32 %pyh, ptr %sdata) #0 align 2 {12entry:13 %sFV = alloca [49 x float], align 414 %tFV = alloca [49 x float], align 415 %TIM = alloca [9 x float], align 416 %sort_tmp = alloca [432 x float], align 417 %msDiffs = alloca [432 x float], align 418 %TM.sroa.0.0.copyload = load float, ptr %tm, align 419 %TM.sroa.8.0.copyload = load float, ptr null, align 420 %TM.sroa.9.0..sroa_idx813 = getelementptr inbounds float, ptr %tm, i32 621 %TM.sroa.9.0.copyload = load float, ptr %TM.sroa.9.0..sroa_idx813, align 422 %TM.sroa.11.0.copyload = load float, ptr undef, align 423 br i1 undef, label %for.body.lr.ph, label %if.then34324 25for.body.lr.ph: ; preds = %entry26 %arrayidx8 = getelementptr inbounds %struct.r, ptr %this, i32 0, i32 1, i32 %lev, i32 027 %arrayidx12 = getelementptr inbounds %struct.r, ptr %this, i32 0, i32 1, i32 %lev, i32 628 %arrayidx15 = getelementptr inbounds %struct.r, ptr %this, i32 0, i32 1, i32 %lev, i32 429 %arrayidx20 = getelementptr inbounds %struct.r, ptr %this, i32 0, i32 1, i32 %lev, i32 730 %arrayidx24 = getelementptr inbounds %struct.r, ptr %this, i32 0, i32 2, i32 %lev, i32 031 %arrayidx28 = getelementptr inbounds %struct.r, ptr %this, i32 0, i32 2, i32 %lev, i32 632 %arrayidx32 = getelementptr inbounds %struct.r, ptr %this, i32 0, i32 2, i32 %lev, i32 433 %arrayidx36 = getelementptr inbounds %struct.r, ptr %this, i32 0, i32 2, i32 %lev, i32 734 %arrayidx84 = getelementptr inbounds [9 x float], ptr %TIM, i32 0, i32 635 %arrayidx92 = getelementptr inbounds [9 x float], ptr %TIM, i32 0, i32 736 %add116 = add nsw i32 %pyh, 1537 br label %for.body38 39for.body: ; preds = %for.cond.cleanup40, %for.body.lr.ph40 %arrayidx.phi = phi ptr [ %sX, %for.body.lr.ph ], [ %arrayidx.inc, %for.cond.cleanup40 ]41 %arrayidx4.phi = phi ptr [ %sY, %for.body.lr.ph ], [ %arrayidx4.inc, %for.cond.cleanup40 ]42 %0 = load float, ptr %arrayidx.phi, align 443 %1 = load float, ptr %arrayidx4.phi, align 444 %2 = load float, ptr %arrayidx12, align 445 %add = fadd fast float 0.000000e+00, %246 %3 = load float, ptr %arrayidx20, align 447 %add21 = fadd fast float 0.000000e+00, %348 %mul3.i = fmul fast float %add21, %TM.sroa.8.0.copyload49 %add.i = fadd fast float 0.000000e+00, %TM.sroa.11.0.copyload50 %add5.i = fadd fast float %add.i, %mul3.i51 %conv6.i = fdiv fast float 1.000000e+00, %add5.i52 %mul8.i = fmul fast float %add, %TM.sroa.0.0.copyload53 %add11.i = fadd fast float %mul8.i, %TM.sroa.9.0.copyload54 %add13.i = fadd fast float %add11.i, 0.000000e+0055 %4 = load float, ptr %arrayidx24, align 456 %mul14.i = fmul fast float %add13.i, %457 %mul25 = fmul fast float %mul14.i, %conv6.i58 %add29 = fadd fast float %mul25, 0.000000e+0059 %arrayidx.inc = getelementptr float, ptr %arrayidx.phi, i32 160 %arrayidx4.inc = getelementptr float, ptr %arrayidx4.phi, i32 161 %conv64.1 = sitofp i32 undef to float62 %conv64.6 = sitofp i32 undef to float63 br label %for.body4164 65for.cond.cleanup40: ; preds = %for.body4166 %call = call fast float undef(ptr nonnull %this, ptr undef, i32 49)67 br label %for.body68 69for.body41: ; preds = %for.cond.cleanup56.for.body41_crit_edge, %for.body70 %5 = phi float [ 0.000000e+00, %for.body ], [ %.pre, %for.cond.cleanup56.for.body41_crit_edge ]71 %sFVData.0840 = phi ptr [ undef, %for.body ], [ undef, %for.cond.cleanup56.for.body41_crit_edge ]72 %dx.0838 = phi i32 [ -3, %for.body ], [ undef, %for.cond.cleanup56.for.body41_crit_edge ]73 %conv42 = sitofp i32 %dx.0838 to float74 %add43 = fadd fast float %conv42, %add2975 %conv44 = fptosi float %add43 to i3276 %conv48 = sitofp i32 %conv44 to float77 %mul49 = fmul fast float %5, %conv4878 %add53 = fadd fast float %mul49, 0.000000e+0079 %conv111 = fptosi float undef to i3280 %cond = select i1 undef, i32 %conv111, i32 -1681 %cond.add116 = select i1 undef, i32 %cond, i32 %add11682 %cmp132 = icmp sgt i32 undef, -1683 %cond137 = select i1 %cmp132, i32 undef, i32 -1684 %cond153 = select i1 undef, i32 %cond137, i32 undef85 %add.ptr = getelementptr inbounds i8, ptr %sdata, i32 %cond15386 %mul154 = mul nsw i32 %cond.add116, %siW87 %add.ptr155 = getelementptr inbounds i8, ptr %add.ptr, i32 %mul15488 %6 = load i8, ptr %add.ptr155, align 189 %conv157 = uitofp i8 %6 to float90 %incdec.ptr = getelementptr inbounds float, ptr %sFVData.0840, i32 191 store float %conv157, ptr %sFVData.0840, align 492 %7 = load float, ptr %arrayidx15, align 493 %mul65.1 = fmul fast float %7, %conv64.194 %8 = load float, ptr %arrayidx20, align 495 %add69.1 = fadd fast float %mul65.1, %896 %conv78.1 = fdiv fast float 1.000000e+00, 0.000000e+0097 %9 = load float, ptr undef, align 498 %mul80.1 = fmul fast float %9, %add5399 %10 = load float, ptr undef, align 4100 %mul82.1 = fmul fast float %10, %add69.1101 %add83.1 = fadd fast float %mul82.1, %mul80.1102 %11 = load float, ptr %arrayidx84, align 4103 %add85.1 = fadd fast float %add83.1, %11104 %mul86.1 = fmul fast float %add85.1, %conv78.1105 %12 = load float, ptr %arrayidx92, align 4106 %add93.1 = fadd fast float 0.000000e+00, %12107 %mul94.1 = fmul fast float %add93.1, %conv78.1108 %13 = load float, ptr %arrayidx24, align 4109 %mul98.1 = fmul fast float %mul86.1, %13110 %14 = load float, ptr %arrayidx28, align 4111 %add102.1 = fadd fast float %mul98.1, %14112 %15 = load float, ptr %arrayidx32, align 4113 %mul106.1 = fmul fast float %mul94.1, %15114 %16 = load float, ptr %arrayidx36, align 4115 %add110.1 = fadd fast float %mul106.1, %16116 %conv111.1 = fptosi float %add102.1 to i32117 %conv112.1 = fptosi float %add110.1 to i32118 %cond.1 = select i1 undef, i32 %conv111.1, i32 -16119 %cond.add116.1 = select i1 undef, i32 %cond.1, i32 %add116120 %cond137.1 = select i1 undef, i32 %conv112.1, i32 -16121 %cond153.1 = select i1 undef, i32 %cond137.1, i32 undef122 %add.ptr.1 = getelementptr inbounds i8, ptr %sdata, i32 %cond153.1123 %mul154.1 = mul nsw i32 %cond.add116.1, %siW124 %add.ptr155.1 = getelementptr inbounds i8, ptr %add.ptr.1, i32 %mul154.1125 %17 = load i8, ptr %add.ptr155.1, align 1126 %conv157.1 = uitofp i8 %17 to float127 %incdec.ptr.1 = getelementptr inbounds float, ptr %sFVData.0840, i32 2128 store float %conv157.1, ptr %incdec.ptr, align 4129 %conv112.2 = fptosi float undef to i32130 %cond137.2 = select i1 undef, i32 %conv112.2, i32 -16131 %cond153.2 = select i1 undef, i32 %cond137.2, i32 undef132 %add.ptr.2 = getelementptr inbounds i8, ptr %sdata, i32 %cond153.2133 %18 = load i8, ptr %add.ptr.2, align 1134 %conv157.2 = uitofp i8 %18 to float135 %incdec.ptr.2 = getelementptr inbounds float, ptr %sFVData.0840, i32 3136 store float %conv157.2, ptr %incdec.ptr.1, align 4137 %cmp132.3 = icmp sgt i32 undef, -16138 %cond137.3 = select i1 %cmp132.3, i32 undef, i32 -16139 %cond153.3 = select i1 undef, i32 %cond137.3, i32 undef140 %add.ptr.3 = getelementptr inbounds i8, ptr %sdata, i32 %cond153.3141 %19 = load i8, ptr %add.ptr.3, align 1142 %conv157.3 = uitofp i8 %19 to float143 store float %conv157.3, ptr %incdec.ptr.2, align 4144 %incdec.ptr.5 = getelementptr inbounds float, ptr %sFVData.0840, i32 6145 %20 = load float, ptr %arrayidx15, align 4146 %mul65.6 = fmul fast float %20, %conv64.6147 %21 = load float, ptr %arrayidx20, align 4148 %add69.6 = fadd fast float %mul65.6, %21149 %conv78.6 = fdiv fast float 1.000000e+00, 0.000000e+00150 %22 = load float, ptr undef, align 4151 %mul82.6 = fmul fast float %22, %add69.6152 %add83.6 = fadd fast float %mul82.6, 0.000000e+00153 %23 = load float, ptr %arrayidx84, align 4154 %add85.6 = fadd fast float %add83.6, %23155 %mul86.6 = fmul fast float %add85.6, %conv78.6156 %24 = load float, ptr %arrayidx24, align 4157 %mul98.6 = fmul fast float %mul86.6, %24158 %25 = load float, ptr %arrayidx28, align 4159 %add102.6 = fadd fast float %mul98.6, %25160 %conv111.6 = fptosi float %add102.6 to i32161 %conv112.6 = fptosi float undef to i32162 %cond.6 = select i1 undef, i32 %conv111.6, i32 -16163 %cond.add116.6 = select i1 undef, i32 %cond.6, i32 %add116164 %cmp132.6 = icmp sgt i32 %conv112.6, -16165 %cond137.6 = select i1 %cmp132.6, i32 %conv112.6, i32 -16166 %cond153.6 = select i1 undef, i32 %cond137.6, i32 undef167 %add.ptr.6 = getelementptr inbounds i8, ptr %sdata, i32 %cond153.6168 %mul154.6 = mul nsw i32 %cond.add116.6, %siW169 %add.ptr155.6 = getelementptr inbounds i8, ptr %add.ptr.6, i32 %mul154.6170 %26 = load i8, ptr %add.ptr155.6, align 1171 %conv157.6 = uitofp i8 %26 to float172 store float %conv157.6, ptr %incdec.ptr.5, align 4173 %exitcond874 = icmp eq i32 %dx.0838, 3174 br i1 %exitcond874, label %for.cond.cleanup40, label %for.cond.cleanup56.for.body41_crit_edge175 176for.cond.cleanup56.for.body41_crit_edge: ; preds = %for.body41177 %.pre = load float, ptr %arrayidx8, align 4178 br label %for.body41179 180if.then343: ; preds = %entry181 ret void182}183 184attributes #0 = { sspstrong uwtable "frame-pointer"="none" "target-cpu"="cortex-a7" }185 186!1 = !{!2, !2, i64 0}187!2 = !{!"float", !3, i64 0}188!3 = !{!"omnipotent char", !4, i64 0}189!4 = !{!"Simple C/C++ TBAA"}190!5 = !{!3, !3, i64 0}191