zeroinitializer-gep-load.ll 310 B

1234567891011
  1. ; RUN: opt < %s -S -globalopt | FileCheck %s
  2. @zero = internal global [10 x i32] zeroinitializer
  3. define i32 @test1(i64 %idx) nounwind {
  4. %arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* @zero, i64 0, i64 %idx
  5. %l = load i32, i32* %arrayidx
  6. ret i32 %l
  7. ; CHECK-LABEL: @test1(
  8. ; CHECK: ret i32 0
  9. }