blob: 8edaa64a62be9dd1588cdf9d34c502de76d7b2b3 [file] [log] [blame]
Justin Bogner6f6c5f22016-04-25 23:36:50 +00001; RUN: opt < %s -globalopt -S | FileCheck %s
2; CHECK-NOT: global
Chris Lattnered8d7672004-10-09 21:50:05 +00003
Tanya Lattner5640bd12008-03-01 09:15:35 +00004@G = internal global void ()* null ; <void ()**> [#uses=2]
Chris Lattnered8d7672004-10-09 21:50:05 +00005
Tanya Lattner5640bd12008-03-01 09:15:35 +00006define internal void @Actual() {
7 ret void
Chris Lattnered8d7672004-10-09 21:50:05 +00008}
9
Tanya Lattner5640bd12008-03-01 09:15:35 +000010define void @init() {
11 store void ()* @Actual, void ()** @G
12 ret void
Chris Lattnered8d7672004-10-09 21:50:05 +000013}
14
Tanya Lattner5640bd12008-03-01 09:15:35 +000015define void @doit() {
David Blaikiea79ac142015-02-27 21:17:42 +000016 %FP = load void ()*, void ()** @G ; <void ()*> [#uses=1]
Tanya Lattner5640bd12008-03-01 09:15:35 +000017 call void %FP( )
18 ret void
Chris Lattnered8d7672004-10-09 21:50:05 +000019}