xref: /aosp_15_r20/external/llvm/test/CodeGen/ARM/fast-tail-call.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=thumbv7-linux-gnueabi -O0 < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=thumbv8m.base-arm-none-eabi -filetype=obj < %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; Primarily a non-crash test: Thumbv7 Linux does not have FastISel support,
5*9880d681SAndroid Build Coastguard Worker; which led (via a convoluted route) to DAG nodes after a TC_RETURN that
6*9880d681SAndroid Build Coastguard Worker; couldn't possibly work.
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Workerdeclare i8* @g(i8*)
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Workerdefine i8* @f(i8* %a) {
11*9880d681SAndroid Build Coastguard Workerentry:
12*9880d681SAndroid Build Coastguard Worker  %0 = tail call i8* @g(i8* %a)
13*9880d681SAndroid Build Coastguard Worker  ret i8* %0
14*9880d681SAndroid Build Coastguard Worker; CHECK: b g
15*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: ldr
16*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: str
17*9880d681SAndroid Build Coastguard Worker}
18