mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Add the PPC fcpsgn instruction
Modern PPC cores support a floating-point copysign instruction, and we can use this to lower the FCOPYSIGN node (which is created from calls to the libm copysign function). A couple of extra patterns are necessary because the operand types of FCOPYSIGN need not agree. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188653 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -149,8 +149,13 @@ PPCTargetLowering::PPCTargetLowering(PPCTargetMachine &TM)
|
||||
Subtarget->hasFRSQRTES() && Subtarget->hasFRES()))
|
||||
setOperationAction(ISD::FSQRT, MVT::f32, Expand);
|
||||
|
||||
setOperationAction(ISD::FCOPYSIGN, MVT::f64, Expand);
|
||||
setOperationAction(ISD::FCOPYSIGN, MVT::f32, Expand);
|
||||
if (Subtarget->hasFCPSGN()) {
|
||||
setOperationAction(ISD::FCOPYSIGN, MVT::f64, Legal);
|
||||
setOperationAction(ISD::FCOPYSIGN, MVT::f32, Legal);
|
||||
} else {
|
||||
setOperationAction(ISD::FCOPYSIGN, MVT::f64, Expand);
|
||||
setOperationAction(ISD::FCOPYSIGN, MVT::f32, Expand);
|
||||
}
|
||||
|
||||
if (Subtarget->hasFPRND()) {
|
||||
setOperationAction(ISD::FFLOOR, MVT::f64, Legal);
|
||||
|
||||
Reference in New Issue
Block a user