blob: aefe200dc7465e0b369b8a1570685bd434e2c409 [file] [log] [blame]
Chad Rosier89831582012-11-17 00:42:06 +00001; 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 Rosierd24e7e1d2011-10-27 00:21:16 +00003
4define i32 @t1(i32 %a, i32 %b) nounwind uwtable ssp {
5entry:
6; THUMB: t1:
7; ARM: t1:
Eric Christophere9abba72012-04-10 18:18:10 +00008 %x = add i32 %a, %b
Chad Rosierd24e7e1d2011-10-27 00:21:16 +00009 br i1 1, label %if.then, label %if.else
Derek Schuffbd7c6e52013-05-14 16:26:38 +000010; THUMB-NOT: b {{\.?}}LBB0_1
11; ARM-NOT: b {{\.?}}LBB0_1
Chad Rosierd24e7e1d2011-10-27 00:21:16 +000012
13if.then: ; preds = %entry
14 call void @foo1()
15 br label %if.end7
16
17if.else: ; preds = %entry
18 br i1 0, label %if.then2, label %if.else3
Derek Schuffbd7c6e52013-05-14 16:26:38 +000019; THUMB: b {{\.?}}LBB0_4
20; ARM: b {{\.?}}LBB0_4
Chad Rosierd24e7e1d2011-10-27 00:21:16 +000021
22if.then2: ; preds = %if.else
23 call void @foo2()
24 br label %if.end6
25
26if.else3: ; preds = %if.else
Eric Christophere9abba72012-04-10 18:18:10 +000027 %y = sub i32 %a, %b
Chad Rosierd24e7e1d2011-10-27 00:21:16 +000028 br i1 1, label %if.then5, label %if.end
Derek Schuffbd7c6e52013-05-14 16:26:38 +000029; THUMB-NOT: b {{\.?}}LBB0_5
30; ARM-NOT: b {{\.?}}LBB0_5
Chad Rosierd24e7e1d2011-10-27 00:21:16 +000031
32if.then5: ; preds = %if.else3
33 call void @foo1()
34 br label %if.end
35
36if.end: ; preds = %if.then5, %if.else3
37 br label %if.end6
38
39if.end6: ; preds = %if.end, %if.then2
40 br label %if.end7
41
42if.end7: ; preds = %if.end6, %if.then
43 ret i32 0
44}
45
46declare void @foo1()
47
48declare void @foo2()