1; RUN: llc < %s -mcpu=cortex-a8 -verify-regalloc 2target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32" 3target triple = "thumbv7-apple-ios" 4 5; This test calls shrinkToUses with an early-clobber redefined live range during 6; spilling. 7; 8; Shrink: %vreg47,1.158257e-02 = [384r,400e:0)[400e,420r:1) 0@384r 1@400e 9; 10; The early-clobber instruction is an str: 11; 12; %vreg12<earlyclobber,def> = t2STR_PRE %vreg6, %vreg12, 32, pred:14, pred:%noreg 13; 14; This tests that shrinkToUses handles the EC redef correctly. 15 16%struct.Transform_Struct.0.11.12.17.43.46.56.58.60 = type { [4 x [4 x double]] } 17 18define void @Compute_Axis_Rotation_Transform(%struct.Transform_Struct.0.11.12.17.43.46.56.58.60* nocapture %transform, double* nocapture %V1, double %angle) nounwind { 19entry: 20 store double 1.000000e+00, double* null, align 4 21 %arrayidx5.1.i = getelementptr inbounds %struct.Transform_Struct.0.11.12.17.43.46.56.58.60, %struct.Transform_Struct.0.11.12.17.43.46.56.58.60* %transform, i32 0, i32 0, i32 0, i32 1 22 store double 0.000000e+00, double* %arrayidx5.1.i, align 4 23 %arrayidx5.2.i = getelementptr inbounds %struct.Transform_Struct.0.11.12.17.43.46.56.58.60, %struct.Transform_Struct.0.11.12.17.43.46.56.58.60* %transform, i32 0, i32 0, i32 0, i32 2 24 store double 0.000000e+00, double* %arrayidx5.2.i, align 4 25 %arrayidx5.114.i = getelementptr inbounds %struct.Transform_Struct.0.11.12.17.43.46.56.58.60, %struct.Transform_Struct.0.11.12.17.43.46.56.58.60* %transform, i32 0, i32 0, i32 1, i32 0 26 store double 0.000000e+00, double* %arrayidx5.114.i, align 4 27 %arrayidx5.1.1.i = getelementptr inbounds %struct.Transform_Struct.0.11.12.17.43.46.56.58.60, %struct.Transform_Struct.0.11.12.17.43.46.56.58.60* %transform, i32 0, i32 0, i32 1, i32 1 28 store double 1.000000e+00, double* %arrayidx5.1.1.i, align 4 29 store double 0.000000e+00, double* null, align 4 30 store double 1.000000e+00, double* null, align 4 31 store double 0.000000e+00, double* null, align 4 32 %call = tail call double @cos(double %angle) nounwind readnone 33 %call1 = tail call double @sin(double %angle) nounwind readnone 34 %0 = load double, double* %V1, align 4 35 %arrayidx2 = getelementptr inbounds double, double* %V1, i32 1 36 %1 = load double, double* %arrayidx2, align 4 37 %mul = fmul double %0, %1 38 %sub = fsub double 1.000000e+00, %call 39 %mul3 = fmul double %mul, %sub 40 %2 = load double, double* undef, align 4 41 %mul5 = fmul double %2, %call1 42 %add = fadd double %mul3, %mul5 43 store double %add, double* %arrayidx5.1.i, align 4 44 %3 = load double, double* %V1, align 4 45 %mul11 = fmul double %3, undef 46 %mul13 = fmul double %mul11, %sub 47 %4 = load double, double* %arrayidx2, align 4 48 %mul15 = fmul double %4, %call1 49 %sub16 = fsub double %mul13, %mul15 50 store double %sub16, double* %arrayidx5.2.i, align 4 51 %5 = load double, double* %V1, align 4 52 %6 = load double, double* %arrayidx2, align 4 53 %mul22 = fmul double %5, %6 54 %mul24 = fmul double %mul22, %sub 55 %sub27 = fsub double %mul24, undef 56 store double %sub27, double* %arrayidx5.114.i, align 4 57 ret void 58} 59 60declare double @cos(double) nounwind readnone 61 62declare double @sin(double) nounwind readnone 63