mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
[SystemZ] Add CodeGen support for scalar f64 ops in vector registers
The z13 vector facility includes some instructions that operate only on the high f64 in a v2f64, effectively extending the FP register set from 16 to 32 registers. It's still better to use the old instructions if the operands happen to fit though, since the older instructions have a shorter encoding. Based on a patch by Richard Sandiford. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236524 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
; Test rounding functions for z196 and above.
|
||||
;
|
||||
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z196 | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z196 \
|
||||
; RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK-SCALAR %s
|
||||
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 \
|
||||
; RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK-VECTOR %s
|
||||
|
||||
; Test rint for f32.
|
||||
declare float @llvm.rint.f32(float %f)
|
||||
@@ -16,7 +19,8 @@ define float @f1(float %f) {
|
||||
declare double @llvm.rint.f64(double %f)
|
||||
define double @f2(double %f) {
|
||||
; CHECK-LABEL: f2:
|
||||
; CHECK: fidbr %f0, 0, %f0
|
||||
; CHECK-SCALAR: fidbr %f0, 0, %f0
|
||||
; CHECK-VECTOR: fidbra %f0, 0, %f0, 0
|
||||
; CHECK: br %r14
|
||||
%res = call double @llvm.rint.f64(double %f)
|
||||
ret double %res
|
||||
|
||||
Reference in New Issue
Block a user