Dan Gohman | da594cf | 2009-09-09 00:09:15 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s |
Evan Cheng | 9dcb760 | 2009-09-04 07:47:40 +0000 | [diff] [blame] | 2 | |
| 3 | ; There shouldn't be a unconditional branch at end of bb52. |
| 4 | ; rdar://7184787 |
| 5 | |
| 6 | @posed = external global i64 ; <i64*> [#uses=1] |
| 7 | |
| 8 | define i1 @ab_bb52(i64 %.reload78, i64* %.out, i64* %.out1) nounwind { |
| 9 | newFuncRoot: |
| 10 | br label %bb52 |
| 11 | |
| 12 | bb52.bb55_crit_edge.exitStub: ; preds = %bb52 |
| 13 | store i64 %0, i64* %.out |
| 14 | store i64 %2, i64* %.out1 |
| 15 | ret i1 true |
| 16 | |
| 17 | bb52.bb53_crit_edge.exitStub: ; preds = %bb52 |
| 18 | store i64 %0, i64* %.out |
| 19 | store i64 %2, i64* %.out1 |
| 20 | ret i1 false |
| 21 | |
| 22 | bb52: ; preds = %newFuncRoot |
Evan Cheng | 9dcb760 | 2009-09-04 07:47:40 +0000 | [diff] [blame] | 23 | ; CHECK: movne |
Evan Cheng | 69e343b | 2009-10-02 06:53:57 +0000 | [diff] [blame] | 24 | ; CHECK: moveq |
| 25 | ; CHECK: pop |
Dan Gohman | 6638ea7 | 2009-11-11 19:48:59 +0000 | [diff] [blame] | 26 | ; CHECK-NEXT: LBB1_1: |
Evan Cheng | 9dcb760 | 2009-09-04 07:47:40 +0000 | [diff] [blame] | 27 | %0 = load i64* @posed, align 4 ; <i64> [#uses=3] |
| 28 | %1 = sub i64 %0, %.reload78 ; <i64> [#uses=1] |
| 29 | %2 = ashr i64 %1, 1 ; <i64> [#uses=3] |
| 30 | %3 = icmp eq i64 %2, 0 ; <i1> [#uses=1] |
| 31 | br i1 %3, label %bb52.bb55_crit_edge.exitStub, label %bb52.bb53_crit_edge.exitStub |
| 32 | } |