SelectionDAG::SignBitIsZero doesn't work right for vectors,

for now, conservatively return false.

llvm-svn: 74969
This commit is contained in:
Chris Lattner 2009-07-07 23:28:46 +00:00
parent 9e5b64b7b7
commit f3989abdbf
1 changed files with 4 additions and 0 deletions

View File

@ -1516,6 +1516,10 @@ SDValue SelectionDAG::FoldSetCC(MVT VT, SDValue N1,
/// SignBitIsZero - Return true if the sign bit of Op is known to be zero. We
/// use this predicate to simplify operations downstream.
bool SelectionDAG::SignBitIsZero(SDValue Op, unsigned Depth) const {
// This predicate is not safe for vector operations.
if (Op.getValueType().isVector())
return false;
unsigned BitWidth = Op.getValueSizeInBits();
return MaskedValueIsZero(Op, APInt::getSignBit(BitWidth), Depth);
}