Weiming Zhao | 5930ae6 | 2014-01-23 19:55:33 +0000 | [diff] [blame] | 1 | ; 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 Cheng | 903231b | 2011-12-17 01:25:34 +0000 | [diff] [blame] | 3 | |
| 4 | %struct.LIST_NODE.0.16 = type { %struct.LIST_NODE.0.16*, i8* } |
| 5 | |
| 6 | define %struct.LIST_NODE.0.16* @list_AssocListPair(%struct.LIST_NODE.0.16* %List, i8* %Key) nounwind readonly { |
| 7 | entry: |
| 8 | br label %bb3 |
| 9 | |
| 10 | bb: ; preds = %bb3 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 11 | %Scan.0.idx7.val = load i8*, i8** undef, align 4 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 12 | %.idx = getelementptr i8, i8* %Scan.0.idx7.val, i32 4 |
Evan Cheng | 903231b | 2011-12-17 01:25:34 +0000 | [diff] [blame] | 13 | %0 = bitcast i8* %.idx to i8** |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 14 | %.idx.val = load i8*, i8** %0, align 4 |
Evan Cheng | 903231b | 2011-12-17 01:25:34 +0000 | [diff] [blame] | 15 | %1 = icmp eq i8* %.idx.val, %Key |
| 16 | br i1 %1, label %bb5, label %bb2 |
| 17 | |
| 18 | bb2: ; preds = %bb |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 19 | %Scan.0.idx8.val = load %struct.LIST_NODE.0.16*, %struct.LIST_NODE.0.16** undef, align 4 |
Evan Cheng | 903231b | 2011-12-17 01:25:34 +0000 | [diff] [blame] | 20 | br label %bb3 |
| 21 | |
| 22 | bb3: ; 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 | |
| 27 | bb5: ; preds = %bb3, %bb |
| 28 | ret %struct.LIST_NODE.0.16* null |
| 29 | } |
Weiming Zhao | f66be56 | 2014-01-13 18:47:54 +0000 | [diff] [blame] | 30 | |
| 31 | declare void @use(i32) |
| 32 | define double @find_max_double(i32 %n, double* nocapture readonly %aa) { |
| 33 | entry: |
Weiming Zhao | f66be56 | 2014-01-13 18:47:54 +0000 | [diff] [blame] | 34 | br i1 undef, label %for.body, label %for.end |
| 35 | |
| 36 | for.body: ; preds = %for.body, %entry |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 37 | %0 = load double, double* null, align 8 |
Weiming Zhao | f66be56 | 2014-01-13 18:47:54 +0000 | [diff] [blame] | 38 | %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 | |
| 44 | for.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 | } |