From d09b05b0bcce05de70265367bc42645c24667b1b Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Mon, 27 Mar 2006 08:10:26 +0000 Subject: Try again llvm-svn: 27171 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp') diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 8fec8a268be..43679c7daad 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -91,9 +91,16 @@ bool ISD::isBuildVectorAllOnes(const SDNode *N) { if (!cast(NotZero)->isAllOnesValue()) return false; } else if (isa(NotZero)) { - if (DoubleToBits(cast(NotZero)->getValue()) == - (0ULL - 1)) - return false; + MVT::ValueType VT = NotZero.getValueType(); + if (VT== MVT::f64) { + if (DoubleToBits(cast(NotZero)->getValue()) != + (uint64_t)-1) + return false; + } else { + if (FloatToBits(cast(NotZero)->getValue()) != + (uint32_t)-1) + return false; + } } else return false; -- cgit v1.2.3