diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-08-21 09:04:20 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-08-21 09:04:20 +0000 |
commit | af5f66ac9efee815ccd69653c2adf2f2bb9f7da7 (patch) | |
tree | 37f820eee9d7e5bbadbf1b6b71f9b1f5408b8a21 /llvm/lib/Target/SystemZ/SystemZISelLowering.cpp | |
parent | 8e92c389e405c0fa5951e35c58eeb20ebb67eba9 (diff) | |
download | bcm5719-llvm-af5f66ac9efee815ccd69653c2adf2f2bb9f7da7.tar.gz bcm5719-llvm-af5f66ac9efee815ccd69653c2adf2f2bb9f7da7.zip |
[SystemZ] Use FI[EDX]BRA for codegen
llvm-svn: 188895
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZISelLowering.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp index 6710f89a1a4..7772b9ed443 100644 --- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp +++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp @@ -209,6 +209,15 @@ SystemZTargetLowering::SystemZTargetLowering(SystemZTargetMachine &tm) // We can use FI for FRINT. setOperationAction(ISD::FRINT, VT, Legal); + // We can use the extended form of FI for other rounding operations. + if (Subtarget.hasFPExtension()) { + setOperationAction(ISD::FNEARBYINT, VT, Legal); + setOperationAction(ISD::FFLOOR, VT, Legal); + setOperationAction(ISD::FCEIL, VT, Legal); + setOperationAction(ISD::FTRUNC, VT, Legal); + setOperationAction(ISD::FROUND, VT, Legal); + } + // No special instructions for these. setOperationAction(ISD::FSIN, VT, Expand); setOperationAction(ISD::FCOS, VT, Expand); |