mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
a9bbb2f3a9
On some Arm cores there is a performance penalty when forwarding from an S register to a D register. Calculating VMAX in a D register creates false forwarding hazards, so don't do that unless we're on a core which specifically asks for it. Patch by James Greenhalgh Differential Revision: https://reviews.llvm.org/D75248
26 lines
714 B
LLVM
26 lines
714 B
LLVM
; RUN: llc -mtriple=arm-eabihf -mattr=+neon < %s | FileCheck -check-prefixes=CHECK-NO_NEON %s
|
|
; RUN: llc -mtriple=arm-eabihf -mattr=+neon,+neonfp < %s | FileCheck -check-prefixes=CHECK-NEON %s
|
|
|
|
define float @max_f32(float, float) {
|
|
;CHECK-NEON: vmax.f32
|
|
;CHECK-NO_NEON: vcmp.f32
|
|
;CHECK-NO_NEON: vmrs
|
|
;CHECK-NO_NEON: vmovgt.f32
|
|
%3 = call nnan float @llvm.maxnum.f32(float %1, float %0)
|
|
ret float %3
|
|
}
|
|
|
|
declare float @llvm.maxnum.f32(float, float) #1
|
|
|
|
define float @min_f32(float, float) {
|
|
;CHECK-NEON: vmin.f32
|
|
;CHECK-NO_NEON: vcmp.f32
|
|
;CHECK-NO_NEON: vmrs
|
|
;CHECK-NO_NEON: vmovlt.f32
|
|
%3 = call nnan float @llvm.minnum.f32(float %1, float %0)
|
|
ret float %3
|
|
}
|
|
|
|
declare float @llvm.minnum.f32(float, float) #1
|
|
|