Fix a bug in the soft-float handling of FCOPYSIGN that Duncan noticed

when working on legalizetypes.  Both legalizetypes and legalizeops now
produce hte same code for CodeGen/ARM/fcopysign.ll.

llvm-svn: 53435
This commit is contained in:
Chris Lattner 2008-07-10 23:46:13 +00:00
parent 17b234cf9b
commit 87909d0629
1 changed files with 5 additions and 2 deletions

View File

@ -547,8 +547,11 @@ SDOperand ExpandFCOPYSIGNToBitwiseOps(SDNode *Node, MVT NVT,
SignBit = DAG.getNode(ISD::SRL, SrcNVT, SignBit,
DAG.getConstant(SizeDiff, TLI.getShiftAmountTy()));
SignBit = DAG.getNode(ISD::TRUNCATE, NVT, SignBit);
} else if (SizeDiff < 0)
SignBit = DAG.getNode(ISD::SIGN_EXTEND, NVT, SignBit);
} else if (SizeDiff < 0) {
SignBit = DAG.getNode(ISD::ZERO_EXTEND, NVT, SignBit);
SignBit = DAG.getNode(ISD::SHL, NVT, SignBit,
DAG.getConstant(-SizeDiff, TLI.getShiftAmountTy()));
}
// Clear the sign bit of first operand.
SDOperand Mask2 = (VT == MVT::f64)