blob: b1ce3bb935e30534c054988818d39c4ab3e6e7a8 [file] [log] [blame]
Jim Grosbach63b46fa2011-06-30 22:10:46 +00001; RUN: llc -mtriple=thumbv7-apple-darwin10 < %s | FileCheck %s
Cameron Zwarichaaa5f142011-06-07 23:54:00 +00002
3%struct.op = type { %struct.op*, %struct.op*, %struct.op* ()*, i32, i16, i16, i8, i8 }
4
5; CHECK: Perl_ck_sort
Jim Grosbach63b46fa2011-06-30 22:10:46 +00006; CHECK: ldreq
7; CHECK: moveq [[REGISTER:(r[0-9]+)|(lr)]]
8; CHECK: streq {{(r[0-9])|(lr)}}, {{\[}}[[REGISTER]]{{\]}}, #24
Cameron Zwarichaaa5f142011-06-07 23:54:00 +00009
10define void @Perl_ck_sort() nounwind optsize {
11entry:
12 %tmp27 = load %struct.op** undef, align 4
13 switch i16 undef, label %if.end151 [
14 i16 178, label %if.then60
15 i16 177, label %if.then60
16 ]
17
18if.then60: ; preds = %if.then40
19 br i1 undef, label %if.then67, label %if.end95
20
21if.then67: ; preds = %if.then60
22 %op_next71 = getelementptr inbounds %struct.op* %tmp27, i32 0, i32 0
23 store %struct.op* %tmp27, %struct.op** %op_next71, align 4
24 %0 = getelementptr inbounds %struct.op* %tmp27, i32 1, i32 0
25 br label %if.end95
26
27if.end95: ; preds = %if.else92, %if.then67
28 %.pre-phi = phi %struct.op** [ undef, %if.then60 ], [ %0, %if.then67 ]
29 %tmp98 = load %struct.op** %.pre-phi, align 4
30 br label %if.end151
31
32if.end151: ; preds = %if.end100, %if.end, %entry
33 ret void
34}