llvm-6502/test/CodeGen/X86/rip-rel-address.ll
Dan Gohman 72bb0a64af Use %rip-relative addressing on x86-64 whenever practical, as
it has a smaller encoding than absolute addressing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67002 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-14 02:33:41 +00:00

8 lines
188 B
LLVM

; RUN: llvm-as < %s | llc -march=x86-64 -relocation-model=static | grep {a(%rip)}
@a = internal global double 3.4
define double @foo() nounwind {
%a = load double* @a
ret double %a
}