blob: b9bfdcbec4e498e60e88e0977bf2e982e257bb1f [file] [log] [blame]
Tim Northoverb4ddc082014-05-30 10:09:59 +00001; RUN: llc -mtriple=thumbv7-apple-darwin10 -arm-atomic-cfg-tidy=0 < %s | FileCheck %s
Cameron Zwarich2e252de2011-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
Peter Collingbourne65295232015-04-23 20:31:30 +00006; CHECK: ldr
7; CHECK: mov [[REGISTER:(r[0-9]+)|(lr)]]
8; CHECK: str {{(r[0-9])|(lr)}}, {{\[}}[[REGISTER]]{{\]}}, #24
Cameron Zwarich2e252de2011-06-07 23:54:00 +00009
10define void @Perl_ck_sort() nounwind optsize {
11entry:
David Blaikiea79ac142015-02-27 21:17:42 +000012 %tmp27 = load %struct.op*, %struct.op** undef, align 4
Cameron Zwarich2e252de2011-06-07 23:54:00 +000013 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
David Blaikie79e6c742015-02-27 19:29:02 +000022 %op_next71 = getelementptr inbounds %struct.op, %struct.op* %tmp27, i32 0, i32 0
Cameron Zwarich2e252de2011-06-07 23:54:00 +000023 store %struct.op* %tmp27, %struct.op** %op_next71, align 4
David Blaikie79e6c742015-02-27 19:29:02 +000024 %0 = getelementptr inbounds %struct.op, %struct.op* %tmp27, i32 1, i32 0
Cameron Zwarich2e252de2011-06-07 23:54:00 +000025 br label %if.end95
26
27if.end95: ; preds = %if.else92, %if.then67
28 %.pre-phi = phi %struct.op** [ undef, %if.then60 ], [ %0, %if.then67 ]
David Blaikiea79ac142015-02-27 21:17:42 +000029 %tmp98 = load %struct.op*, %struct.op** %.pre-phi, align 4
Cameron Zwarich2e252de2011-06-07 23:54:00 +000030 br label %if.end151
31
32if.end151: ; preds = %if.end100, %if.end, %entry
33 ret void
34}