blob: 6b8717ee18315f7e13927bac47bd8f24ae33e014 [file] [log] [blame]
Dan Gohman18800922009-09-11 18:01:28 +00001; RUN: opt < %s -globalopt -S | not grep internal
Chris Lattnerf150ace2007-11-13 21:42:48 +00002
3; This is a harder case to delete as the GEP has a variable index.
4
5@G = internal global [4 x i32] zeroinitializer
6
7define void @foo(i32 %X) {
David Blaikie79e6c742015-02-27 19:29:02 +00008 %Ptr = getelementptr [4 x i32], [4 x i32]* @G, i32 0, i32 %X
Chris Lattnerf150ace2007-11-13 21:42:48 +00009 store i32 1, i32* %Ptr
10 ret void
11}