1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -asm-verbose=false -O3 -relocation-model=pic -disable-fp-elim -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -post-RA-scheduler 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker; ModuleID = '<stdin>' 4*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:64" 5*9880d681SAndroid Build Coastguard Workertarget triple = "armv7-apple-darwin9" 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Worker%struct.Hosp = type { i32, i32, i32, %struct.List, %struct.List, %struct.List, %struct.List } 8*9880d681SAndroid Build Coastguard Worker%struct.List = type { %struct.List*, %struct.Patient*, %struct.List* } 9*9880d681SAndroid Build Coastguard Worker%struct.Patient = type { i32, i32, i32, %struct.Village* } 10*9880d681SAndroid Build Coastguard Worker%struct.Village = type { [4 x %struct.Village*], %struct.Village*, %struct.List, %struct.Hosp, i32, i32 } 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Workerdefine %struct.Village* @alloc_tree(i32 %level, i32 %label, %struct.Village* %back, i1 %p) nounwind { 13*9880d681SAndroid Build Coastguard Workerentry: 14*9880d681SAndroid Build Coastguard Worker br i1 %p, label %bb8, label %bb1 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Workerbb1: ; preds = %entry 17*9880d681SAndroid Build Coastguard Worker %malloccall = tail call i8* @malloc(i32 ptrtoint (%struct.Village* getelementptr (%struct.Village, %struct.Village* null, i32 1) to i32)) 18*9880d681SAndroid Build Coastguard Worker %0 = bitcast i8* %malloccall to %struct.Village* 19*9880d681SAndroid Build Coastguard Worker %exp2 = call double @ldexp(double 1.000000e+00, i32 %level) nounwind ; <double> [#uses=1] 20*9880d681SAndroid Build Coastguard Worker %.c = fptosi double %exp2 to i32 ; <i32> [#uses=1] 21*9880d681SAndroid Build Coastguard Worker store i32 %.c, i32* null 22*9880d681SAndroid Build Coastguard Worker %1 = getelementptr %struct.Village, %struct.Village* %0, i32 0, i32 3, i32 6, i32 0 ; <%struct.List**> [#uses=1] 23*9880d681SAndroid Build Coastguard Worker store %struct.List* null, %struct.List** %1 24*9880d681SAndroid Build Coastguard Worker %2 = getelementptr %struct.Village, %struct.Village* %0, i32 0, i32 3, i32 6, i32 2 ; <%struct.List**> [#uses=1] 25*9880d681SAndroid Build Coastguard Worker store %struct.List* null, %struct.List** %2 26*9880d681SAndroid Build Coastguard Worker ret %struct.Village* %0 27*9880d681SAndroid Build Coastguard Worker 28*9880d681SAndroid Build Coastguard Workerbb8: ; preds = %entry 29*9880d681SAndroid Build Coastguard Worker ret %struct.Village* null 30*9880d681SAndroid Build Coastguard Worker} 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard Workerdeclare double @ldexp(double, i32) 33*9880d681SAndroid Build Coastguard Workerdeclare noalias i8* @malloc(i32) 34