llvm-6502/test/CodeGen/X86/ga-offset.ll
Evan Cheng 424f8f339a For Darwin / x86_64, override -relocation-model=static to pic if the output is assembly since Darwin assembler does not really support -static codeine.
I view this as a temporary workaround until the assembler / linker changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72806 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 21:13:54 +00:00

19 lines
516 B
LLVM

; RUN: llvm-as < %s | llc -march=x86 > %t
; RUN: not grep lea %t
; RUN: not grep add %t
; RUN: grep mov %t | count 1
; RUN: llvm-as < %s | llc -mtriple=x86_64-linux -relocation-model=static > %t
; RUN: not grep lea %t
; RUN: not grep add %t
; RUN: grep mov %t | count 1
; This store should fold to a single mov instruction.
@ptr = global i32* null
@dst = global [131072 x i32] zeroinitializer
define void @foo() nounwind {
store i32* getelementptr ([131072 x i32]* @dst, i32 0, i32 16), i32** @ptr
ret void
}