mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 22:28:18 +00:00
Allow the APInt form of ComputeMaskedBits to operate on i128 types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47101 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1134,14 +1134,13 @@ void SelectionDAG::ComputeMaskedBits(SDOperand Op, const APInt &Mask,
|
|||||||
APInt &KnownZero, APInt &KnownOne,
|
APInt &KnownZero, APInt &KnownOne,
|
||||||
unsigned Depth) const {
|
unsigned Depth) const {
|
||||||
unsigned BitWidth = Mask.getBitWidth();
|
unsigned BitWidth = Mask.getBitWidth();
|
||||||
|
assert(BitWidth == MVT::getSizeInBits(Op.getValueType()) &&
|
||||||
|
"Mask size mismatches value type size!");
|
||||||
|
|
||||||
KnownZero = KnownOne = APInt(BitWidth, 0); // Don't know anything.
|
KnownZero = KnownOne = APInt(BitWidth, 0); // Don't know anything.
|
||||||
if (Depth == 6 || Mask == 0)
|
if (Depth == 6 || Mask == 0)
|
||||||
return; // Limit search depth.
|
return; // Limit search depth.
|
||||||
|
|
||||||
// The masks are not wide enough to represent this type! Should use APInt.
|
|
||||||
if (Op.getValueType() == MVT::i128)
|
|
||||||
return;
|
|
||||||
|
|
||||||
APInt KnownZero2, KnownOne2;
|
APInt KnownZero2, KnownOne2;
|
||||||
|
|
||||||
switch (Op.getOpcode()) {
|
switch (Op.getOpcode()) {
|
||||||
@@ -1477,6 +1476,10 @@ void SelectionDAG::ComputeMaskedBits(SDOperand Op, const APInt &Mask,
|
|||||||
void SelectionDAG::ComputeMaskedBits(SDOperand Op, uint64_t Mask,
|
void SelectionDAG::ComputeMaskedBits(SDOperand Op, uint64_t Mask,
|
||||||
uint64_t &KnownZero, uint64_t &KnownOne,
|
uint64_t &KnownZero, uint64_t &KnownOne,
|
||||||
unsigned Depth) const {
|
unsigned Depth) const {
|
||||||
|
// The masks are not wide enough to represent this type! Should use APInt.
|
||||||
|
if (Op.getValueType() == MVT::i128)
|
||||||
|
return;
|
||||||
|
|
||||||
unsigned NumBits = MVT::getSizeInBits(Op.getValueType());
|
unsigned NumBits = MVT::getSizeInBits(Op.getValueType());
|
||||||
APInt APIntMask(NumBits, Mask);
|
APInt APIntMask(NumBits, Mask);
|
||||||
APInt APIntKnownZero(NumBits, 0);
|
APInt APIntKnownZero(NumBits, 0);
|
||||||
|
Reference in New Issue
Block a user