Allow for copysign having f80 second argument.

Fixes 5550319.

llvm-svn: 43205
This commit is contained in:
Dale Johannesen 2007-10-21 01:07:44 +00:00
parent 34bb3728ff
commit 2edd0fb69d

View File

@ -4040,6 +4040,15 @@ SDOperand X86TargetLowering::LowerFCOPYSIGN(SDOperand Op, SelectionDAG &DAG) {
SrcVT = VT;
SrcTy = MVT::getTypeForValueType(SrcVT);
}
// And if it is bigger, shrink it first.
if (MVT::getSizeInBits(SrcVT) > MVT::getSizeInBits(VT)) {
Op1 = DAG.getNode(ISD::FP_ROUND, VT, Op1);
SrcVT = VT;
SrcTy = MVT::getTypeForValueType(SrcVT);
}
// At this point the operands and the result should have the same
// type, and that won't be f80 since that is not custom lowered.
// First get the sign bit of second operand.
std::vector<Constant*> CV;