fix a bug Anders ran into where scalarrepl would crash when promoting
[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: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | not grep call
5
6 int %aaa(int %c) {
7 entry:
8         %tmp.1 = seteq int %c, 0                ; <bool> [#uses=1]
9         br bool %tmp.1, label %return, label %else
10
11 else:           ; preds = %entry
12         %tmp.5 = add int %c, -1         ; <int> [#uses=1]
13         %tmp.3 = call int %aaa( int %tmp.5 )            ; <int> [#uses=0]
14         ret int 0
15
16 return:         ; preds = %entry
17         ret int 0
18 }
19