mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-01 16:33:37 +01:00
0f885eb7fd
than doing the same via constpool: 1. Load from constpool costs 3 cycles on A9, movt/movw pair - just 2. 2. Load from constpool might stall up to 300 cycles due to cache miss. 3. Movt/movw does not use load/store unit. 4. Less constpool entries => better compiler performance. This is only enabled on ELF systems, since darwin does not have needed relocations (yet). llvm-svn: 89720
21 lines
611 B
LLVM
21 lines
611 B
LLVM
; RUN: llc < %s | FileCheck %s
|
|
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
|
|
target triple = "armv7-eabi"
|
|
|
|
@foo = common global i32 0 ; <i32*> [#uses=1]
|
|
|
|
define arm_aapcs_vfpcc i32* @bar1() nounwind readnone {
|
|
entry:
|
|
; CHECK: movw r0, :lower16:foo
|
|
; CHECK-NEXT: movt r0, :upper16:foo
|
|
ret i32* @foo
|
|
}
|
|
|
|
define arm_aapcs_vfpcc void @bar2(i32 %baz) nounwind {
|
|
entry:
|
|
; CHECK: movw r1, :lower16:foo
|
|
; CHECK-NEXT: movt r1, :upper16:foo
|
|
store i32 %baz, i32* @foo, align 4
|
|
ret void
|
|
}
|