diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-07-07 23:28:46 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-07-07 23:28:46 +0000 |
| commit | f3989abdbfd96ac35e53940f083c8789a0adb019 (patch) | |
| tree | 472653645f209a9de5a7394c2d947edaac786717 | |
| parent | 9e5b64b7b7df37ee51538e36409b077aa431e7ba (diff) | |
| download | bcm5719-llvm-f3989abdbfd96ac35e53940f083c8789a0adb019.tar.gz bcm5719-llvm-f3989abdbfd96ac35e53940f083c8789a0adb019.zip | |
SelectionDAG::SignBitIsZero doesn't work right for vectors,
for now, conservatively return false.
llvm-svn: 74969
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 5f45c980a58..c46eee8a4ed 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/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); } |

