2016-07-23 20:41:05 +00:00
|
|
|
; RUN: opt < %s -globalopt -S | FileCheck %s
|
2009-06-02 17:52:33 +00:00
|
|
|
; This is a harder case to delete as the GEP has a variable index.
|
|
|
|
|
2016-07-23 20:41:05 +00:00
|
|
|
; CHECK-NOT: internal
|
2009-06-02 17:52:33 +00:00
|
|
|
@G = internal global [4 x i32] zeroinitializer
|
|
|
|
|
|
|
|
define void @foo(i32 %X) {
|
2015-05-27 18:44:32 +00:00
|
|
|
%Ptr = getelementptr [4 x i32], [4 x i32]* @G, i32 0, i32 %X
|
2009-06-02 17:52:33 +00:00
|
|
|
store i32 1, i32* %Ptr
|
|
|
|
ret void
|
|
|
|
}
|