mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-24 21:42:54 +02:00
a2d4395226
Summary: Attaching !absolute_symbol to a global variable does two things: 1) Marks it as an absolute symbol reference. 2) Specifies the value range of that symbol's address. Teach the X86 backend to allow absolute symbols to appear in place of immediates by extending the relocImm and mov64imm32 matchers. Start using relocImm in more places where it is legal. As previously proposed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2016-October/105800.html Differential Revision: https://reviews.llvm.org/D25878 llvm-svn: 289087
11 lines
181 B
LLVM
11 lines
181 B
LLVM
; RUN: opt -S -functionattrs %s | FileCheck %s
|
|
|
|
@a = external global i8, !absolute_symbol !0
|
|
|
|
; CHECK-NOT: define nonnull
|
|
define i8* @foo() {
|
|
ret i8* @a
|
|
}
|
|
|
|
!0 = !{i64 0, i64 256}
|