mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
1e8839302b
This implements the review suggestion to simplify the AArch64 backend. If we later discover that we *really* need the extra complexity of the ConstantIslands pass for performance reasons it can be resurrected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175258 91177308-0d34-0410-b5e6-96231b3b80d8
15 lines
383 B
LLVM
15 lines
383 B
LLVM
; RUN: llc -mtriple=aarch64-none-linux-gnu -o - < %s | FileCheck %s
|
|
|
|
declare extern_weak i32 @var()
|
|
|
|
define i32()* @foo() {
|
|
; The usual ADRP/ADD pair can't be used for a weak reference because it must
|
|
; evaluate to 0 if the symbol is undefined. We use a litpool entry.
|
|
ret i32()* @var
|
|
; CHECK: .LCPI0_0:
|
|
; CHECK-NEXT: .xword var
|
|
|
|
; CHECK: ldr x0, [{{x[0-9]+}}, #:lo12:.LCPI0_0]
|
|
|
|
}
|