Remove use of implementation keyword.
[oota-llvm.git] / test / CodeGen / ARM / 2007-03-06-AddR7.ll
1 ; RUN: llvm-as < %s | llc -march=thumb &&
2 ; RUN: llvm-as < %s | llc -mtriple=thumb-apple-darwin -relocation-model=pic -mattr=+v6,+vfp2 | not grep 'add r., r7, #2 \* 4'
3
4         %struct.__fooAllocator = type opaque
5         %struct.__fooY = type { %struct.fooXBase, %struct.__fooString*, %struct.__fooU*, %struct.__fooV*, i8** }
6         %struct.__fooZ = type opaque
7         %struct.__fooU = type opaque
8         %struct.__fooString = type opaque
9         %struct.__fooV = type opaque
10         %struct.fooXBase = type { i32, [4 x i8] }
11         %struct.fooXClass = type { i32, i8*, void (i8*)*, i8* (%struct.__fooAllocator*, i8*)*, void (i8*)*, i8 (i8*, i8*) zext *, i32 (i8*)*, %struct.__fooString* (i8*, %struct.__fooZ*)*, %struct.__fooString* (i8*)* }
12         %struct.aa_cache = type { i32, i32, [1 x %struct.aa_method*] }
13         %struct.aa_class = type { %struct.aa_class*, %struct.aa_class*, i8*, i32, i32, i32, %struct.aa_ivar_list*, %struct.aa_method_list**, %struct.aa_cache*, %struct.aa_protocol_list* }
14         %struct.aa_ivar = type { i8*, i8*, i32 }
15         %struct.aa_ivar_list = type { i32, [1 x %struct.aa_ivar] }
16         %struct.aa_method = type { %struct.aa_ss*, i8*, %struct.aa_object* (%struct.aa_object*, %struct.aa_ss*, ...)* }
17         %struct.aa_method_list = type { %struct.aa_method_list*, i32, [1 x %struct.aa_method] }
18         %struct.aa_object = type { %struct.aa_class* }
19         %struct.aa_protocol_list = type { %struct.aa_protocol_list*, i32, [1 x %struct.aa_object*] }
20         %struct.aa_ss = type opaque
21 @__kfooYTypeID = external global i32            ; <i32*> [#uses=3]
22 @__fooYClass = external constant %struct.fooXClass              ; <%struct.fooXClass*> [#uses=1]
23 @__fooXClassTableSize = external global i32             ; <i32*> [#uses=1]
24 @__fooXAaClassTable = external global i32*              ; <i32**> [#uses=1]
25 @s.10319 = external global %struct.aa_ss*               ; <%struct.aa_ss**> [#uses=2]
26 @str15 = external constant [24 x i8]            ; <[24 x i8]*> [#uses=1]
27
28
29 define i8 @test(%struct.__fooY* %calendar, double* %atp, i8* %componentDesc, ...) zext  {
30 entry:
31         %args = alloca i8*, align 4             ; <i8**> [#uses=5]
32         %args4 = bitcast i8** %args to i8*              ; <i8*> [#uses=2]
33         call void @llvm.va_start( i8* %args4 )
34         %tmp6 = load i32* @__kfooYTypeID                ; <i32> [#uses=1]
35         icmp eq i32 %tmp6, 0            ; <i1>:0 [#uses=1]
36         br i1 %0, label %cond_true, label %cond_next
37
38 cond_true:              ; preds = %entry
39         %tmp7 = call i32 @_fooXRegisterClass( %struct.fooXClass* @__fooYClass )         ; <i32> [#uses=1]
40         store i32 %tmp7, i32* @__kfooYTypeID
41         br label %cond_next
42
43 cond_next:              ; preds = %cond_true, %entry
44         %tmp8 = load i32* @__kfooYTypeID                ; <i32> [#uses=2]
45         %tmp15 = load i32* @__fooXClassTableSize                ; <i32> [#uses=1]
46         icmp ugt i32 %tmp15, %tmp8              ; <i1>:1 [#uses=1]
47         br i1 %1, label %cond_next18, label %cond_true58
48
49 cond_next18:            ; preds = %cond_next
50         %tmp21 = getelementptr %struct.__fooY* %calendar, i32 0, i32 0, i32 0           ; <i32*> [#uses=1]
51         %tmp22 = load i32* %tmp21               ; <i32> [#uses=2]
52         %tmp29 = load i32** @__fooXAaClassTable         ; <i32*> [#uses=1]
53         %tmp31 = getelementptr i32* %tmp29, i32 %tmp8           ; <i32*> [#uses=1]
54         %tmp32 = load i32* %tmp31               ; <i32> [#uses=1]
55         icmp eq i32 %tmp22, %tmp32              ; <i1>:2 [#uses=1]
56         %.not = xor i1 %2, true         ; <i1> [#uses=1]
57         icmp ugt i32 %tmp22, 4095               ; <i1>:3 [#uses=1]
58         %bothcond = and i1 %.not, %3            ; <i1> [#uses=1]
59         br i1 %bothcond, label %cond_true58, label %bb48
60
61 bb48:           ; preds = %cond_next18
62         %tmp78 = call i32 @strlen( i8* %componentDesc )         ; <i32> [#uses=4]
63         %tmp92 = alloca i32, i32 %tmp78         ; <i32*> [#uses=2]
64         icmp sgt i32 %tmp78, 0          ; <i1>:4 [#uses=1]
65         br i1 %4, label %cond_true111, label %bb114
66
67 cond_true58:            ; preds = %cond_next18, %cond_next
68         %tmp59 = load %struct.aa_ss** @s.10319          ; <%struct.aa_ss*> [#uses=2]
69         icmp eq %struct.aa_ss* %tmp59, null             ; <i1>:5 [#uses=1]
70         %tmp6869 = bitcast %struct.__fooY* %calendar to i8*             ; <i8*> [#uses=2]
71         br i1 %5, label %cond_true60, label %cond_next64
72
73 cond_true60:            ; preds = %cond_true58
74         %tmp63 = call %struct.aa_ss* @sel_registerName( i8* getelementptr ([24 x i8]* @str15, i32 0, i32 0) )           ; <%struct.aa_ss*> [#uses=2]
75         store %struct.aa_ss* %tmp63, %struct.aa_ss** @s.10319
76         %tmp66137 = volatile load i8** %args            ; <i8*> [#uses=1]
77         %tmp73138 = call i8 (i8*, %struct.aa_ss*, ...) zext * bitcast (%struct.aa_object* (%struct.aa_object*, %struct.aa_ss*, ...)* @aa_mm to i8 (i8*, %struct.aa_ss*, ...) zext *)( i8* %tmp6869, %struct.aa_ss* %tmp63, double* %atp, i8* %componentDesc, i8* %tmp66137 ) zext               ; <i8> [#uses=1]
78         ret i8 %tmp73138
79
80 cond_next64:            ; preds = %cond_true58
81         %tmp66 = volatile load i8** %args               ; <i8*> [#uses=1]
82         %tmp73 = call i8 (i8*, %struct.aa_ss*, ...) zext * bitcast (%struct.aa_object* (%struct.aa_object*, %struct.aa_ss*, ...)* @aa_mm to i8 (i8*, %struct.aa_ss*, ...) zext *)( i8* %tmp6869, %struct.aa_ss* %tmp59, double* %atp, i8* %componentDesc, i8* %tmp66 ) zext             ; <i8> [#uses=1]
83         ret i8 %tmp73
84
85 cond_true111:           ; preds = %cond_true111, %bb48
86         %idx.2132.0 = phi i32 [ 0, %bb48 ], [ %indvar.next, %cond_true111 ]             ; <i32> [#uses=2]
87         %tmp95 = volatile load i8** %args               ; <i8*> [#uses=2]
88         %tmp97 = getelementptr i8* %tmp95, i32 4                ; <i8*> [#uses=1]
89         volatile store i8* %tmp97, i8** %args
90         %tmp9899 = bitcast i8* %tmp95 to i32*           ; <i32*> [#uses=1]
91         %tmp100 = load i32* %tmp9899            ; <i32> [#uses=1]
92         %tmp104 = getelementptr i32* %tmp92, i32 %idx.2132.0            ; <i32*> [#uses=1]
93         store i32 %tmp100, i32* %tmp104
94         %indvar.next = add i32 %idx.2132.0, 1           ; <i32> [#uses=2]
95         icmp eq i32 %indvar.next, %tmp78                ; <i1>:6 [#uses=1]
96         br i1 %6, label %bb114, label %cond_true111
97
98 bb114:          ; preds = %cond_true111, %bb48
99         call void @llvm.va_end( i8* %args4 )
100         %tmp122 = call i8 @_fooYCCV( %struct.__fooY* %calendar, double* %atp, i8* %componentDesc, i32* %tmp92, i32 %tmp78 ) zext                ; <i8> [#uses=1]
101         ret i8 %tmp122
102 }
103
104 declare i32 @_fooXRegisterClass(%struct.fooXClass*)
105
106 declare i8 @_fooYCCV(%struct.__fooY*, double*, i8*, i32*, i32) zext 
107
108 declare %struct.aa_object* @aa_mm(%struct.aa_object*, %struct.aa_ss*, ...)
109
110 declare %struct.aa_ss* @sel_registerName(i8*)
111
112 declare void @llvm.va_start(i8*)
113
114 declare i32 @strlen(i8*)
115
116 declare void @llvm.va_end(i8*)