blob: d85d97d5a7e5551623de0b6089b058526da3673d [file] [log] [blame]
Reid Spencer951d8dc2007-04-15 08:30:33 +00001; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | \
2; RUN: grep {call void @Actual}
Chris Lattnercd1e7562004-10-10 23:12:33 +00003
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
9implementation
10
11internal void %Actual() {
12 ret void
13}
14
15void %init() {
16 store void()* %Actual, void()** %G
17 ret void
18}
19
20void %doit() {
21 %FP = load void()** %G
22 %CC = seteq void()* %FP, null
23 br bool %CC, label %isNull, label %DoCall
24DoCall:
25 call void %FP()
26 ret void
27isNull:
28 ret void
29}