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