2016-04-26 07:36:50 +08:00
|
|
|
; RUN: opt < %s -globalopt -S | FileCheck %s
|
|
|
|
; CHECK-NOT: global
|
2004-10-10 05:50:05 +08:00
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
@G = internal global void ()* null ; <void ()**> [#uses=2]
|
2004-10-10 05:50:05 +08:00
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
define internal void @Actual() {
|
|
|
|
ret void
|
2004-10-10 05:50:05 +08:00
|
|
|
}
|
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
define void @init() {
|
|
|
|
store void ()* @Actual, void ()** @G
|
|
|
|
ret void
|
2004-10-10 05:50:05 +08:00
|
|
|
}
|
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
define void @doit() {
|
2015-02-28 05:17:42 +08:00
|
|
|
%FP = load void ()*, void ()** @G ; <void ()*> [#uses=1]
|
2008-03-01 17:15:35 +08:00
|
|
|
call void %FP( )
|
|
|
|
ret void
|
2004-10-10 05:50:05 +08:00
|
|
|
}
|