This commit is a 4x squash commit consisting of 4x functions converted to use FileChe...
[oota-llvm.git] / test / Transforms / TailCallElim / return_constant.ll
1 ; Though this case seems to be fairly unlikely to occur in the wild, someone
2 ; plunked it into the demo script, so maybe they care about it.
3 ;
4 ; RUN: opt < %s -tailcallelim -S | FileCheck %s
5
6 define i32 @aaa(i32 %c) {
7 entry:
8         %tmp.1 = icmp eq i32 %c, 0              ; <i1> [#uses=1]
9         br i1 %tmp.1, label %return, label %else
10 else:           ; preds = %entry
11         %tmp.5 = add i32 %c, -1         ; <i32> [#uses=1]
12 ; CHECK-NOT: call
13         %tmp.3 = call i32 @aaa( i32 %tmp.5 )            ; <i32> [#uses=0]
14         ret i32 0
15 return:         ; preds = %entry
16         ret i32 0
17 }
18