Files
clang-p2996/llvm/test/CodeGen/AArch64/win_cst_pool.ll
Adhemerval Zanella a3cefa5d64 [AArch64] Optimize floating point materialization
This patch follows some ideas from r352866 to optimize the floating
point materialization even further. It changes isFPImmLegal to
considere up to 2 mov instruction or up to 5 in case subtarget has
fused literals.

The rationale is the cost is the same for mov+fmov vs. adrp+ldr; but
the mov+fmov sequence is always better because of the reduced d-cache
pressure. The timings are still the same if you consider movw+movk+fmov
vs. adrp+ldr will be fused (although one instruction longer).

Reviewers: efriedma

Differential Revision: https://reviews.llvm.org/D58460

llvm-svn: 356390
2019-03-18 18:45:57 +00:00

25 lines
944 B
LLVM

; RUN: llc < %s -mtriple=aarch64-win32-msvc | FileCheck %s
; RUN: llc < %s -mtriple=aarch64-win32-gnu | FileCheck -check-prefix=MINGW %s
define double @double() {
ret double 0x2000000000800001
}
; CHECK: .globl __real@2000000000800001
; CHECK-NEXT: .section .rdata,"dr",discard,__real@2000000000800001
; CHECK-NEXT: .p2align 3
; CHECK-NEXT: __real@2000000000800001:
; CHECK-NEXT: .xword 2305843009222082561
; CHECK: double:
; CHECK: adrp x8, __real@2000000000800001
; CHECK-NEXT: ldr d0, [x8, __real@2000000000800001]
; CHECK-NEXT: ret
; MINGW: .section .rdata,"dr"
; MINGW-NEXT: .p2align 3
; MINGW-NEXT: [[LABEL:\.LC.*]]:
; MINGW-NEXT: .xword 2305843009222082561
; MINGW: double:
; MINGW: adrp x8, [[LABEL]]
; MINGW-NEXT: ldr d0, [x8, [[LABEL]]]
; MINGW-NEXT: ret