mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
Use fldz and fld1 for long double constants instead of a constant pool load.
llvm-svn: 46411
This commit is contained in:
parent
9c66a1b961
commit
f4bc2c5718
@ -455,7 +455,20 @@ X86TargetLowering::X86TargetLowering(TargetMachine &TM)
|
||||
addRegisterClass(MVT::f80, X86::RFP80RegisterClass);
|
||||
setOperationAction(ISD::UNDEF, MVT::f80, Expand);
|
||||
setOperationAction(ISD::FCOPYSIGN, MVT::f80, Expand);
|
||||
setOperationAction(ISD::ConstantFP, MVT::f80, Expand);
|
||||
{
|
||||
setOperationAction(ISD::ConstantFP, MVT::f80, Expand);
|
||||
APFloat TmpFlt(+0.0);
|
||||
TmpFlt.convert(APFloat::x87DoubleExtended, APFloat::rmNearestTiesToEven);
|
||||
addLegalFPImmediate(TmpFlt); // FLD0
|
||||
TmpFlt.changeSign();
|
||||
addLegalFPImmediate(TmpFlt); // FLD0/FCHS
|
||||
APFloat TmpFlt2(+1.0);
|
||||
TmpFlt2.convert(APFloat::x87DoubleExtended, APFloat::rmNearestTiesToEven);
|
||||
addLegalFPImmediate(TmpFlt2); // FLD1
|
||||
TmpFlt2.changeSign();
|
||||
addLegalFPImmediate(TmpFlt2); // FLD1/FCHS
|
||||
}
|
||||
|
||||
if (!UnsafeFPMath) {
|
||||
setOperationAction(ISD::FSIN , MVT::f80 , Expand);
|
||||
setOperationAction(ISD::FCOS , MVT::f80 , Expand);
|
||||
|
Loading…
Reference in New Issue
Block a user