Fix this warning:

DAGCombiner.cpp: In member function 'llvm::SDOperand<unnamed>::DAGCombiner::visitOR(llvm::SDNode*)':
DAGCombiner.cpp:1608: warning: passing negative value '-0x00000000000000001' for argument 1 to 'llvm::SDOperand llvm::SelectionDAG::getConstant(uint64_t, llvm::MVT::ValueType, bool)'

oiy.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38458 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-07-09 16:16:34 +00:00
parent 9a6ae965d6
commit e094f54f4c

View File

@ -1605,7 +1605,7 @@ SDOperand DAGCombiner::visitOR(SDNode *N) {
// fold (or x, undef) -> -1
if (N1.getOpcode() == ISD::UNDEF)
return DAG.getConstant(-1, VT);
return DAG.getConstant(~0ULL, VT);
// fold (or c1, c2) -> c1|c2
if (N0C && N1C)
return DAG.getNode(ISD::OR, VT, N0, N1);