blob: 688cf1a49adb6abb1bbd4d0cbe298815361bc8ac [file] [log] [blame]
Reid Spencerce380562007-01-26 08:25:06 +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}