[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Jan 7 22:24:45 PST 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAG.cpp updated: 1.13 -> 1.14
---
Log message:
1ULL << 64 is undefined, don't do it.
---
Diffs of the changes: (+3 -2)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.13 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.14
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.13 Fri Jan 7 17:32:00 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Jan 8 00:24:30 2005
@@ -218,8 +218,9 @@
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);
More information about the llvm-commits
mailing list