[LoopVectorizer] Refine loop vectorizer's register usage calculator by ignoring speci...
[oota-llvm.git] / test / Transforms / GlobalOpt / storepointer-compare.ll
1 ; RUN: opt < %s -globalopt -S | \
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              ; <void ()**> [#uses=2]
8
9 define internal void @Actual() {
10         ret void
11 }
12
13 define void @init() {
14         store void ()* @Actual, void ()** @G
15         ret void
16 }
17
18 define void @doit() {
19         %FP = load void ()*, void ()** @G         ; <void ()*> [#uses=2]
20         %CC = icmp eq void ()* %FP, null                ; <i1> [#uses=1]
21         br i1 %CC, label %isNull, label %DoCall
22
23 DoCall:         ; preds = %0
24         call void %FP( )
25         ret void
26
27 isNull:         ; preds = %0
28         ret void
29 }
30