Spare '&' in the RUN line.
[oota-llvm.git] / test / Transforms / GlobalOpt / storepointer-compare.llx
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | \
2 ; RUN:   grep {call void @Actual}
3
4 ; Check that a comparison does not prevent an indirect call from being made 
5 ; direct.  The global will still remain, but indirect call elim is still good.
6
7 %G = internal global void ()* null
8
9 implementation
10
11 internal void %Actual() {
12         ret void
13 }
14
15 void %init() {
16         store void()* %Actual, void()** %G
17         ret void
18 }
19
20 void %doit() {
21         %FP = load void()** %G
22         %CC = seteq void()* %FP, null
23         br bool %CC, label %isNull, label %DoCall
24 DoCall:
25         call void %FP()
26         ret void
27 isNull:
28         ret void
29 }