xref: /llvm-project/llvm/test/CodeGen/X86/fake-use-simple-tail-call.ll (revision 822f74a91106b7ca10e85508eb642e62ef945afa)
1; RUN: llc < %s -mtriple=x86_64-unknown-unknown -O2 -o - \
2; RUN:   | FileCheck %s --implicit-check-not=TAILCALL
3; Generated with: clang -emit-llvm -O2 -S -fextend-variable-liveness test.cpp -o -
4; =========== test.cpp ===============
5; extern int bar(int);
6; int foo1(int i)
7; {
8;     return bar(i);
9; }
10; =========== test.cpp ===============
11
12; CHECK: TAILCALL
13
14; ModuleID = 'test.cpp'
15source_filename = "test.cpp"
16
17define i32 @_Z4foo1i(i32 %i) local_unnamed_addr optdebug {
18entry:
19  %call = tail call i32 @_Z3bari(i32 %i)
20  tail call void (...) @llvm.fake.use(i32 %i)
21  ret i32 %call
22}
23
24declare i32 @_Z3bari(i32) local_unnamed_addr
25