aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-07 23:28:46 +0000
committerChris Lattner <sabre@nondot.org>2009-07-07 23:28:46 +0000
commitb9e009a19589e91a91f0bc99395aa57569fa4d62 (patch)
tree1fa224f3ec6a902279333805f2d30803effb31dc /lib/CodeGen
parent375b88b94ed48ccdad5a26e11bed48d1b23b24d4 (diff)
downloadexternal_llvm-b9e009a19589e91a91f0bc99395aa57569fa4d62.zip
external_llvm-b9e009a19589e91a91f0bc99395aa57569fa4d62.tar.gz
external_llvm-b9e009a19589e91a91f0bc99395aa57569fa4d62.tar.bz2
SelectionDAG::SignBitIsZero doesn't work right for vectors,
for now, conservatively return false. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 5f45c98..c46eee8 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -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);
}