mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
1ULL << 64 is undefined, don't do it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19365 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7ab65934a0
commit
623f70dd4c
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user