Chad Rosier | 0a63b6a | 2012-11-17 00:42:06 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM |
| 2 | ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB |
Chad Rosier | 6d64b3a | 2011-10-27 00:21:16 +0000 | [diff] [blame] | 3 | |
| 4 | define i32 @t1(i32 %a, i32 %b) nounwind uwtable ssp { |
| 5 | entry: |
| 6 | ; THUMB: t1: |
| 7 | ; ARM: t1: |
Eric Christopher | 18112d8 | 2012-04-10 18:18:10 +0000 | [diff] [blame] | 8 | %x = add i32 %a, %b |
Chad Rosier | 6d64b3a | 2011-10-27 00:21:16 +0000 | [diff] [blame] | 9 | br i1 1, label %if.then, label %if.else |
Derek Schuff | ed788b6 | 2013-05-14 16:26:38 +0000 | [diff] [blame] | 10 | ; THUMB-NOT: b {{\.?}}LBB0_1 |
| 11 | ; ARM-NOT: b {{\.?}}LBB0_1 |
Chad Rosier | 6d64b3a | 2011-10-27 00:21:16 +0000 | [diff] [blame] | 12 | |
| 13 | if.then: ; preds = %entry |
| 14 | call void @foo1() |
| 15 | br label %if.end7 |
| 16 | |
| 17 | if.else: ; preds = %entry |
| 18 | br i1 0, label %if.then2, label %if.else3 |
Derek Schuff | ed788b6 | 2013-05-14 16:26:38 +0000 | [diff] [blame] | 19 | ; THUMB: b {{\.?}}LBB0_4 |
| 20 | ; ARM: b {{\.?}}LBB0_4 |
Chad Rosier | 6d64b3a | 2011-10-27 00:21:16 +0000 | [diff] [blame] | 21 | |
| 22 | if.then2: ; preds = %if.else |
| 23 | call void @foo2() |
| 24 | br label %if.end6 |
| 25 | |
| 26 | if.else3: ; preds = %if.else |
Eric Christopher | 18112d8 | 2012-04-10 18:18:10 +0000 | [diff] [blame] | 27 | %y = sub i32 %a, %b |
Chad Rosier | 6d64b3a | 2011-10-27 00:21:16 +0000 | [diff] [blame] | 28 | br i1 1, label %if.then5, label %if.end |
Derek Schuff | ed788b6 | 2013-05-14 16:26:38 +0000 | [diff] [blame] | 29 | ; THUMB-NOT: b {{\.?}}LBB0_5 |
| 30 | ; ARM-NOT: b {{\.?}}LBB0_5 |
Chad Rosier | 6d64b3a | 2011-10-27 00:21:16 +0000 | [diff] [blame] | 31 | |
| 32 | if.then5: ; preds = %if.else3 |
| 33 | call void @foo1() |
| 34 | br label %if.end |
| 35 | |
| 36 | if.end: ; preds = %if.then5, %if.else3 |
| 37 | br label %if.end6 |
| 38 | |
| 39 | if.end6: ; preds = %if.end, %if.then2 |
| 40 | br label %if.end7 |
| 41 | |
| 42 | if.end7: ; preds = %if.end6, %if.then |
| 43 | ret i32 0 |
| 44 | } |
| 45 | |
| 46 | declare void @foo1() |
| 47 | |
| 48 | declare void @foo2() |