xref: /aosp_15_r20/external/llvm/test/CodeGen/ARM/call-noret.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=armv7-apple-ios -mcpu=cortex-a8   | FileCheck %s -check-prefix=ARM
2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=armv7-apple-ios -mcpu=swift       | FileCheck %s -check-prefix=SWIFT
3*9880d681SAndroid Build Coastguard Worker; rdar://8979299
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdefine void @t1() noreturn nounwind ssp {
6*9880d681SAndroid Build Coastguard Workerentry:
7*9880d681SAndroid Build Coastguard Worker; ARM-LABEL: t1:
8*9880d681SAndroid Build Coastguard Worker; ARM: mov lr, pc
9*9880d681SAndroid Build Coastguard Worker; ARM: b _bar
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker; SWIFT-LABEL: t1:
12*9880d681SAndroid Build Coastguard Worker; SWIFT: mov lr, pc
13*9880d681SAndroid Build Coastguard Worker; SWIFT: b _bar
14*9880d681SAndroid Build Coastguard Worker  tail call void @bar() noreturn nounwind
15*9880d681SAndroid Build Coastguard Worker  unreachable
16*9880d681SAndroid Build Coastguard Worker}
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Workerdefine void @t2() noreturn nounwind ssp {
19*9880d681SAndroid Build Coastguard Workerentry:
20*9880d681SAndroid Build Coastguard Worker; ARM-LABEL: t2:
21*9880d681SAndroid Build Coastguard Worker; ARM: mov lr, pc
22*9880d681SAndroid Build Coastguard Worker; ARM: b _t1
23*9880d681SAndroid Build Coastguard Worker
24*9880d681SAndroid Build Coastguard Worker; SWIFT-LABEL: t2:
25*9880d681SAndroid Build Coastguard Worker; SWIFT: mov lr, pc
26*9880d681SAndroid Build Coastguard Worker; SWIFT: b _t1
27*9880d681SAndroid Build Coastguard Worker  tail call void @t1() noreturn nounwind
28*9880d681SAndroid Build Coastguard Worker  unreachable
29*9880d681SAndroid Build Coastguard Worker}
30*9880d681SAndroid Build Coastguard Worker
31*9880d681SAndroid Build Coastguard Workerdeclare void @bar() noreturn
32