35490ac69b1668f1b45842dec7cadd00cefae8d0
[oota-llvm.git] / test / CodeGen / ARM / call-noret-minsize.ll
1 ; RUN: llc < %s -mtriple=armv7-apple-ios -mcpu=cortex-a8   | FileCheck %s -check-prefix=ARM
2 ; RUN: llc < %s -mtriple=armv7-apple-ios -mcpu=swift       | FileCheck %s -check-prefix=SWIFT
3 ; RUN: llc < %s -mtriple=thumbv7-apple-ios -mcpu=cortex-a8 | FileCheck %s -check-prefix=T2
4 ; rdar://12348580
5
6 define void @t1() noreturn minsize nounwind ssp {
7 entry:
8 ; ARM: t1:
9 ; ARM: bl _bar
10
11 ; SWIFT: t1:
12 ; SWIFT: bl _bar
13
14 ; T2: t1:
15 ; T2: blx _bar
16   tail call void @bar() noreturn nounwind
17   unreachable
18 }
19
20 define void @t2() noreturn minsize nounwind ssp {
21 entry:
22 ; ARM: t2:
23 ; ARM: bl _t1
24
25 ; SWIFT: t2:
26 ; SWIFT: bl _t1
27
28 ; T2: t2:
29 ; T2: bl _t1
30   tail call void @t1() noreturn nounwind
31   unreachable
32 }
33
34 declare void @bar() noreturn