blob: 382038eb13ef8b038ed4c01ce25180af1c0b1e81 [file] [log] [blame]
David Goodwin471850a2009-10-01 21:46:35 +00001; RUN: llc < %s -asm-verbose=false -O3 -relocation-model=pic -disable-fp-elim -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -post-RA-scheduler
David Goodwin88a589c2009-08-25 17:03:05 +00002
3; ModuleID = '<stdin>'
4target 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"
5target triple = "armv7-apple-darwin9"
6
7%struct.Hosp = type { i32, i32, i32, %struct.List, %struct.List, %struct.List, %struct.List }
8%struct.List = type { %struct.List*, %struct.Patient*, %struct.List* }
9%struct.Patient = type { i32, i32, i32, %struct.Village* }
10%struct.Village = type { [4 x %struct.Village*], %struct.Village*, %struct.List, %struct.Hosp, i32, i32 }
11
Rafael Espindola1e819662010-06-17 15:18:27 +000012define %struct.Village* @alloc_tree(i32 %level, i32 %label, %struct.Village* %back, i1 %p) nounwind {
David Goodwin88a589c2009-08-25 17:03:05 +000013entry:
14 br i1 %p, label %bb8, label %bb1
15
16bb1: ; preds = %entry
Chris Lattner26b00002011-06-17 03:14:27 +000017 %malloccall = tail call i8* @malloc(i32 ptrtoint (%struct.Village* getelementptr (%struct.Village* null, i32 1) to i32))
18 %0 = bitcast i8* %malloccall to %struct.Village*
David Goodwin88a589c2009-08-25 17:03:05 +000019 %exp2 = call double @ldexp(double 1.000000e+00, i32 %level) nounwind ; <double> [#uses=1]
20 %.c = fptosi double %exp2 to i32 ; <i32> [#uses=1]
21 store i32 %.c, i32* null
22 %1 = getelementptr %struct.Village* %0, i32 0, i32 3, i32 6, i32 0 ; <%struct.List**> [#uses=1]
23 store %struct.List* null, %struct.List** %1
24 %2 = getelementptr %struct.Village* %0, i32 0, i32 3, i32 6, i32 2 ; <%struct.List**> [#uses=1]
25 store %struct.List* null, %struct.List** %2
26 ret %struct.Village* %0
27
28bb8: ; preds = %entry
29 ret %struct.Village* null
30}
31
32declare double @ldexp(double, i32)
Chris Lattner26b00002011-06-17 03:14:27 +000033declare noalias i8* @malloc(i32)