[LoopVectorizer] Refine loop vectorizer's register usage calculator by ignoring speci...
[oota-llvm.git] / test / Transforms / GlobalOpt / 2009-06-01-RecursivePHI.ll
1 ; RUN: opt < %s -globalopt
2 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
3
4         %struct.s_annealing_sched = type { i32, float, float, float, float }
5         %struct.s_bb = type { i32, i32, i32, i32 }
6         %struct.s_net = type { i8*, i32, i32*, float, float }
7         %struct.s_placer_opts = type { i32, float, i32, i32, i8*, i32, i32 }
8 @net = internal global %struct.s_net* null              ; <%struct.s_net**> [#uses=4]
9
10 define fastcc void @alloc_and_load_placement_structs(i32 %place_cost_type, i32 %num_regions, float %place_cost_exp, float*** nocapture %old_region_occ_x, float*** nocapture %old_region_occ_y) nounwind ssp {
11 entry:
12         br i1 undef, label %bb.i, label %my_malloc.exit
13
14 bb.i:           ; preds = %entry
15         unreachable
16
17 my_malloc.exit:         ; preds = %entry
18         br i1 undef, label %bb.i81, label %my_malloc.exit83
19
20 bb.i81:         ; preds = %my_malloc.exit
21         unreachable
22
23 my_malloc.exit83:               ; preds = %my_malloc.exit
24         br i1 undef, label %bb.i.i57, label %my_calloc.exit.i
25
26 bb.i.i57:               ; preds = %my_malloc.exit83
27         unreachable
28
29 my_calloc.exit.i:               ; preds = %my_malloc.exit83
30         br i1 undef, label %bb.i4.i, label %my_calloc.exit5.i
31
32 bb.i4.i:                ; preds = %my_calloc.exit.i
33         unreachable
34
35 my_calloc.exit5.i:              ; preds = %my_calloc.exit.i
36         %.pre.i58 = load %struct.s_net*, %struct.s_net** @net, align 4          ; <%struct.s_net*> [#uses=1]
37         br label %bb17.i78
38
39 bb1.i61:                ; preds = %bb4.preheader.i, %bb1.i61
40         br i1 undef, label %bb1.i61, label %bb5.i62
41
42 bb5.i62:                ; preds = %bb1.i61
43         br i1 undef, label %bb6.i64, label %bb15.preheader.i
44
45 bb15.preheader.i:               ; preds = %bb4.preheader.i, %bb5.i62
46         br label %bb16.i77
47
48 bb6.i64:                ; preds = %bb5.i62
49         br i1 undef, label %bb7.i65, label %bb8.i67
50
51 bb7.i65:                ; preds = %bb6.i64
52         unreachable
53
54 bb8.i67:                ; preds = %bb6.i64
55         br i1 undef, label %bb.i1.i68, label %my_malloc.exit.i70
56
57 bb.i1.i68:              ; preds = %bb8.i67
58         unreachable
59
60 my_malloc.exit.i70:             ; preds = %bb8.i67
61         %0 = load %struct.s_net*, %struct.s_net** @net, align 4         ; <%struct.s_net*> [#uses=1]
62         br i1 undef, label %bb9.i71, label %bb16.i77
63
64 bb9.i71:                ; preds = %bb9.i71, %my_malloc.exit.i70
65         %1 = load %struct.s_net*, %struct.s_net** @net, align 4         ; <%struct.s_net*> [#uses=1]
66         br i1 undef, label %bb9.i71, label %bb16.i77
67
68 bb16.i77:               ; preds = %bb9.i71, %my_malloc.exit.i70, %bb15.preheader.i
69         %.pre41.i.rle244 = phi %struct.s_net* [ %.pre41.i, %bb15.preheader.i ], [ %0, %my_malloc.exit.i70 ], [ %1, %bb9.i71 ]           ; <%struct.s_net*> [#uses=1]
70         br label %bb17.i78
71
72 bb17.i78:               ; preds = %bb16.i77, %my_calloc.exit5.i
73         %.pre41.i = phi %struct.s_net* [ %.pre41.i.rle244, %bb16.i77 ], [ %.pre.i58, %my_calloc.exit5.i ]               ; <%struct.s_net*> [#uses=1]
74         br i1 undef, label %bb4.preheader.i, label %alloc_and_load_unique_pin_list.exit
75
76 bb4.preheader.i:                ; preds = %bb17.i78
77         br i1 undef, label %bb1.i61, label %bb15.preheader.i
78
79 alloc_and_load_unique_pin_list.exit:            ; preds = %bb17.i78
80         ret void
81 }
82
83 define void @read_net(i8* %net_file) nounwind ssp {
84 entry:
85         br i1 undef, label %bb3.us.us.i, label %bb6.preheader
86
87 bb6.preheader:          ; preds = %entry
88         br i1 undef, label %bb7, label %bb
89
90 bb3.us.us.i:            ; preds = %entry
91         unreachable
92
93 bb:             ; preds = %bb6.preheader
94         br i1 undef, label %bb.i34, label %bb1.i38
95
96 bb.i34:         ; preds = %bb
97         unreachable
98
99 bb1.i38:                ; preds = %bb
100         %mallocsize = mul i64 28, undef                  ; <i64> [#uses=1]
101         %malloccall = tail call i8* @malloc(i64 %mallocsize)      ; <i8*> [#uses=1]
102         %0 = bitcast i8* %malloccall to %struct.s_net*  ; <%struct.s_net*> [#uses=1]
103         br i1 undef, label %bb.i1.i39, label %my_malloc.exit2.i
104
105 bb.i1.i39:              ; preds = %bb1.i38
106         unreachable
107
108 my_malloc.exit2.i:              ; preds = %bb1.i38
109         store %struct.s_net* %0, %struct.s_net** @net, align 4
110         br i1 undef, label %bb.i7.i40, label %my_malloc.exit8.i
111
112 bb.i7.i40:              ; preds = %my_malloc.exit2.i
113         unreachable
114
115 my_malloc.exit8.i:              ; preds = %my_malloc.exit2.i
116         unreachable
117
118 bb7:            ; preds = %bb6.preheader
119         unreachable
120 }
121
122 declare noalias i8* @malloc(i64)