deadglobal-2.ll 292 B

1234567891011
  1. ; RUN: opt < %s -globalopt -S | not grep internal
  2. ; This is a harder case to delete as the GEP has a variable index.
  3. @G = internal global [4 x i32] zeroinitializer
  4. define void @foo(i32 %X) {
  5. %Ptr = getelementptr [4 x i32], [4 x i32]* @G, i32 0, i32 %X
  6. store i32 1, i32* %Ptr
  7. ret void
  8. }