blob: 5340feed387ed79d54ba796828b3d057602252ba [file] [log] [blame]
Reid Spencerd0e30dc2006-12-02 04:23:10 +00001; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | grep 'call void %Actual'
Chris Lattnercd1e7562004-10-10 23:12:33 +00002
3; Check that a comparison does not prevent an indirect call from being made
4; direct. The global will still remain, but indirect call elim is still good.
5
6%G = internal global void ()* null
7
8implementation
9
10internal void %Actual() {
11 ret void
12}
13
14void %init() {
15 store void()* %Actual, void()** %G
16 ret void
17}
18
19void %doit() {
20 %FP = load void()** %G
21 %CC = seteq void()* %FP, null
22 br bool %CC, label %isNull, label %DoCall
23DoCall:
24 call void %FP()
25 ret void
26isNull:
27 ret void
28}