blob: 7c8802ddad670297ef3e5c62028f8c43938e7a87 [file] [log] [blame]
Weiming Zhao5930ae62014-01-23 19:55:33 +00001; RUN: llc < %s -mtriple=thumbv7-apple-ios -relocation-model=pic -disable-fp-elim -mcpu=cortex-a8
2; RUN: llc < %s -mtriple=thumbv8-none-linux-gnueabi
Evan Cheng903231b2011-12-17 01:25:34 +00003
4%struct.LIST_NODE.0.16 = type { %struct.LIST_NODE.0.16*, i8* }
5
6define %struct.LIST_NODE.0.16* @list_AssocListPair(%struct.LIST_NODE.0.16* %List, i8* %Key) nounwind readonly {
7entry:
8 br label %bb3
9
10bb: ; preds = %bb3
David Blaikiea79ac142015-02-27 21:17:42 +000011 %Scan.0.idx7.val = load i8*, i8** undef, align 4
David Blaikie79e6c742015-02-27 19:29:02 +000012 %.idx = getelementptr i8, i8* %Scan.0.idx7.val, i32 4
Evan Cheng903231b2011-12-17 01:25:34 +000013 %0 = bitcast i8* %.idx to i8**
David Blaikiea79ac142015-02-27 21:17:42 +000014 %.idx.val = load i8*, i8** %0, align 4
Evan Cheng903231b2011-12-17 01:25:34 +000015 %1 = icmp eq i8* %.idx.val, %Key
16 br i1 %1, label %bb5, label %bb2
17
18bb2: ; preds = %bb
David Blaikiea79ac142015-02-27 21:17:42 +000019 %Scan.0.idx8.val = load %struct.LIST_NODE.0.16*, %struct.LIST_NODE.0.16** undef, align 4
Evan Cheng903231b2011-12-17 01:25:34 +000020 br label %bb3
21
22bb3: ; preds = %bb2, %entry
23 %Scan.0 = phi %struct.LIST_NODE.0.16* [ %List, %entry ], [ %Scan.0.idx8.val, %bb2 ]
24 %2 = icmp eq %struct.LIST_NODE.0.16* %Scan.0, null
25 br i1 %2, label %bb5, label %bb
26
27bb5: ; preds = %bb3, %bb
28 ret %struct.LIST_NODE.0.16* null
29}
Weiming Zhaof66be562014-01-13 18:47:54 +000030
31declare void @use(i32)
32define double @find_max_double(i32 %n, double* nocapture readonly %aa) {
33entry:
Weiming Zhaof66be562014-01-13 18:47:54 +000034 br i1 undef, label %for.body, label %for.end
35
36for.body: ; preds = %for.body, %entry
David Blaikiea79ac142015-02-27 21:17:42 +000037 %0 = load double, double* null, align 8
Weiming Zhaof66be562014-01-13 18:47:54 +000038 %cmp2.6 = fcmp ogt double %0, 0.000000e+00
39 %idx.1.6 = select i1 %cmp2.6, i32 undef, i32 0
40 %idx.1.7 = select i1 undef, i32 undef, i32 %idx.1.6
41 %max.1.7 = select i1 undef, double 0.000000e+00, double undef
42 br i1 undef, label %for.end, label %for.body
43
44for.end: ; preds = %for.body, %entry
45 %max.0.lcssa = phi double [ undef, %entry ], [ %max.1.7, %for.body ]
46 %idx.0.lcssa = phi i32 [ 0, %entry ], [ %idx.1.7, %for.body ]
47 tail call void @use(i32 %idx.0.lcssa)
48 ret double %max.0.lcssa
49}