Heuristic: If the number of operands in the alias are more than the number of
[llvm/stm8.git] / test / Transforms / TailCallElim / move_alloca_for_tail_call.ll
bloba556ddb6eb1d8bcfaeade25b336b8ee1922486a4
1 ; RUN: opt -tailcallelim %s -S | FileCheck %s
2 ; PR615
4 declare void @bar(i32*)
6 define i32 @foo() {
7 ; CHECK: i32 @foo()
8 ; CHECK-NEXT: alloca
9         %A = alloca i32         ; <i32*> [#uses=2]
10         store i32 17, i32* %A
11         call void @bar( i32* %A )
12         %X = tail call i32 @foo( )              ; <i32> [#uses=1]
13         ret i32 %X