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 | d09b05b0bcce05de70265367bc42645c24667b1b (patch) | |
tree | 98c3e72ca3b4aed2f109b7215030b5e54b4e198d /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 939c9ab88f13958a321b2cfa6d4178649b2b651c (diff) | |
download | bcm5719-llvm-d09b05b0bcce05de70265367bc42645c24667b1b.tar.gz bcm5719-llvm-d09b05b0bcce05de70265367bc42645c24667b1b.zip |
Try again
llvm-svn: 27171
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
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<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; |