Incorrect check for FP all one's
authorEvan Cheng <evan.cheng@apple.com>
Mon, 27 Mar 2006 07:26:17 +0000 (07:26 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 27 Mar 2006 07:26:17 +0000 (07:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27169 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index 9c8b13029f6736dd9750f6688ca00891ee967f50..8fec8a268be8cbd3a1988bc21e5a36785530f2b5 100644 (file)
@@ -91,7 +91,8 @@ bool ISD::isBuildVectorAllOnes(const SDNode *N) {
     if (!cast<ConstantSDNode>(NotZero)->isAllOnesValue())
       return false;
   } else if (isa<ConstantFPSDNode>(NotZero)) {
-    if (!cast<ConstantFPSDNode>(NotZero)->isExactlyValue(-1))
+    if (DoubleToBits(cast<ConstantFPSDNode>(NotZero)->getValue()) ==
+        (0ULL - 1))
       return false;
   } else
     return false;