blob: 1ffab8074e232d093c052b78823c2fe91ac8613a [file] [log] [blame]
Eric Christophercee313d2019-04-17 04:52:47 +00001; RUN: opt < %s -globalopt -S | FileCheck %s
2
3@G = internal global void ()* null ; <void ()**> [#uses=2]
4; CHECK: global
5
6define internal void @Actual() {
7; CHECK-LABEL: Actual(
8 ret void
9}
10
11define void @init() {
12; CHECK-LABEL: init(
13; CHECK: store void ()* @Actual, void ()** @G
14 store void ()* @Actual, void ()** @G
15 ret void
16}
17
18define void @doit() #0 {
19; CHECK-LABEL: doit(
20; CHECK: %FP = load void ()*, void ()** @G
21; CHECK: call void %FP()
22 %FP = load void ()*, void ()** @G ; <void ()*> [#uses=1]
23 call void %FP( )
24 ret void
25}
26
Nikita Popovf89f7da2020-04-25 12:57:07 +020027attributes #0 = { null_pointer_is_valid }