diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-03-27 08:10:26 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-03-27 08:10:26 +0000 |
commit | 23cc8708c316128088674675707e140658043f85 (patch) | |
tree | 2391dc88a6fa9d399bf437dacb12e9a9696e4375 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 3ee9ffb0e543328bea4052fba0f47ebc16314f79 (diff) |
Try again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 8fec8a268b..43679c7daa 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -91,9 +91,16 @@ bool ISD::isBuildVectorAllOnes(const SDNode *N) { if (!cast<ConstantSDNode>(NotZero)->isAllOnesValue()) return false; } else if (isa<ConstantFPSDNode>(NotZero)) { - if (DoubleToBits(cast<ConstantFPSDNode>(NotZero)->getValue()) == - (0ULL - 1)) - return false; + MVT::ValueType VT = NotZero.getValueType(); + if (VT== MVT::f64) { + if (DoubleToBits(cast<ConstantFPSDNode>(NotZero)->getValue()) != + (uint64_t)-1) + return false; + } else { + if (FloatToBits(cast<ConstantFPSDNode>(NotZero)->getValue()) != + (uint32_t)-1) + return false; + } } else return false; |