blob: 48d76241d55ca0f8937edd17eab210af05ebdff6 [file] [log] [blame]
Evan Cheng903231b2011-12-17 01:25:34 +00001; RUN: llc < %s -mtriple=thumbv7-apple-ios -relocation-model=pic -disable-fp-elim -mcpu=cortex-a8
Weiming Zhaof66be562014-01-13 18:47:54 +00002; RUN: llc < %s -mtriple=thumbv8-none-linux-gnueabi | FileCheck %s
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
11 %Scan.0.idx7.val = load i8** undef, align 4
12 %.idx = getelementptr i8* %Scan.0.idx7.val, i32 4
13 %0 = bitcast i8* %.idx to i8**
14 %.idx.val = load i8** %0, align 4
15 %1 = icmp eq i8* %.idx.val, %Key
16 br i1 %1, label %bb5, label %bb2
17
18bb2: ; preds = %bb
19 %Scan.0.idx8.val = load %struct.LIST_NODE.0.16** undef, align 4
20 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:
34;CHECK-LABEL: find_max_double:
35 br i1 undef, label %for.body, label %for.end
36
37for.body: ; preds = %for.body, %entry
38 %0 = load double* null, align 8
39 %cmp2.6 = fcmp ogt double %0, 0.000000e+00
40 %idx.1.6 = select i1 %cmp2.6, i32 undef, i32 0
41 %idx.1.7 = select i1 undef, i32 undef, i32 %idx.1.6
42 %max.1.7 = select i1 undef, double 0.000000e+00, double undef
43 br i1 undef, label %for.end, label %for.body
44
45for.end: ; preds = %for.body, %entry
46 %max.0.lcssa = phi double [ undef, %entry ], [ %max.1.7, %for.body ]
47 %idx.0.lcssa = phi i32 [ 0, %entry ], [ %idx.1.7, %for.body ]
48 tail call void @use(i32 %idx.0.lcssa)
49 ret double %max.0.lcssa
50}