summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/ga-offset.ll
blob: 3613cf8bf598c0280a3f7865d6b418614d68cc8d (plain)
1
2
3
4
5
6
7
8
9
10
11
; RUN: llc < %s -mtriple=x86_64-linux -relocation-model=static | FileCheck %s

@ptr = global i32* null
@dst = global [131072 x i32] zeroinitializer

define void @foo() nounwind {
; This store should fold to a single mov instruction.
; CHECK: movq    $dst+64, ptr(%rip)
  store i32* getelementptr ([131072 x i32], [131072 x i32]* @dst, i32 0, i32 16), i32** @ptr
  ret void
}
OpenPOWER on IntegriCloud