mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 03:23:01 +02:00
disable MaskedValueIsZero, ComputeMaskedBits, and SimplifyDemandedBits for
i128 integers. The 64-bit masks are not wide enough to represent the results. These should be converted to APInt someday. llvm-svn: 37169
This commit is contained in:
parent
d441344214
commit
910abfbfd1
@ -365,6 +365,11 @@ bool TargetLowering::SimplifyDemandedBits(SDOperand Op, uint64_t DemandedMask,
|
||||
TargetLoweringOpt &TLO,
|
||||
unsigned Depth) const {
|
||||
KnownZero = KnownOne = 0; // Don't know anything.
|
||||
|
||||
// The masks are not wide enough to represent this type! Should use APInt.
|
||||
if (Op.getValueType() == MVT::i128)
|
||||
return false;
|
||||
|
||||
// Other users may use these bits.
|
||||
if (!Op.Val->hasOneUse()) {
|
||||
if (Depth != 0) {
|
||||
@ -874,6 +879,10 @@ bool TargetLowering::SimplifyDemandedBits(SDOperand Op, uint64_t DemandedMask,
|
||||
/// for bits that V cannot have.
|
||||
bool TargetLowering::MaskedValueIsZero(SDOperand Op, uint64_t Mask,
|
||||
unsigned Depth) const {
|
||||
// The masks are not wide enough to represent this type! Should use APInt.
|
||||
if (Op.getValueType() == MVT::i128)
|
||||
return false;
|
||||
|
||||
uint64_t KnownZero, KnownOne;
|
||||
ComputeMaskedBits(Op, Mask, KnownZero, KnownOne, Depth);
|
||||
assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?");
|
||||
@ -891,6 +900,10 @@ void TargetLowering::ComputeMaskedBits(SDOperand Op, uint64_t Mask,
|
||||
if (Depth == 6 || Mask == 0)
|
||||
return; // Limit search depth.
|
||||
|
||||
// The masks are not wide enough to represent this type! Should use APInt.
|
||||
if (Op.getValueType() == MVT::i128)
|
||||
return;
|
||||
|
||||
uint64_t KnownZero2, KnownOne2;
|
||||
|
||||
switch (Op.getOpcode()) {
|
||||
|
Loading…
Reference in New Issue
Block a user