diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-01-08 06:24:30 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-01-08 06:24:30 +0000 |
| commit | 9a97e4d5b6342d48952addc5caf12ada6ef8b3fd (patch) | |
| tree | 640656f6749c69280d3dedb978b11c62e6abeaca /llvm/lib/CodeGen | |
| parent | b923438fe6f1899cb85edd8566a1289291ce352c (diff) | |
| download | bcm5719-llvm-9a97e4d5b6342d48952addc5caf12ada6ef8b3fd.tar.gz bcm5719-llvm-9a97e4d5b6342d48952addc5caf12ada6ef8b3fd.zip | |
1ULL << 64 is undefined, don't do it.
llvm-svn: 19365
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 357275eb244..4ad651718f5 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -218,8 +218,9 @@ SelectionDAG::~SelectionDAG() { SDOperand SelectionDAG::getConstant(uint64_t Val, MVT::ValueType VT) { assert(MVT::isInteger(VT) && "Cannot create FP integer constant!"); // Mask out any bits that are not valid for this constant. - Val &= (1ULL << MVT::getSizeInBits(VT)) - 1; - + if (VT != MVT::i64) + Val &= ((uint64_t)1 << MVT::getSizeInBits(VT)) - 1; + SDNode *&N = Constants[std::make_pair(Val, VT)]; if (N) return SDOperand(N, 0); N = new ConstantSDNode(Val, VT); |

