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