xref: /aosp_15_r20/external/llvm/test/Bitcode/tailcall.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as < %s | llvm-dis | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: verify-uselistorder < %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; Check that musttail and tail roundtrip.
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Workerdeclare cc1023 void @t1_callee()
7*9880d681SAndroid Build Coastguard Workerdefine cc1023 void @t1() {
8*9880d681SAndroid Build Coastguard Worker; CHECK: tail call cc1023 void @t1_callee()
9*9880d681SAndroid Build Coastguard Worker  tail call cc1023 void @t1_callee()
10*9880d681SAndroid Build Coastguard Worker  ret void
11*9880d681SAndroid Build Coastguard Worker}
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Workerdeclare cc1023 void @t2_callee()
14*9880d681SAndroid Build Coastguard Workerdefine cc1023 void @t2() {
15*9880d681SAndroid Build Coastguard Worker; CHECK: musttail call cc1023 void @t2_callee()
16*9880d681SAndroid Build Coastguard Worker  musttail call cc1023 void @t2_callee()
17*9880d681SAndroid Build Coastguard Worker  ret void
18*9880d681SAndroid Build Coastguard Worker}
19