[llvm] 47f99d2 - [SelectionDAG] GetDemandedBits - remove ANY_EXTEND handling
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 21 06:49:43 PST 2020
Author: Simon Pilgrim
Date: 2020-01-21T14:39:00Z
New Revision: 47f99d2ca8adbecb59d04dad550262363b513d6d
URL: https://github.com/llvm/llvm-project/commit/47f99d2ca8adbecb59d04dad550262363b513d6d
DIFF: https://github.com/llvm/llvm-project/commit/47f99d2ca8adbecb59d04dad550262363b513d6d.diff
LOG: [SelectionDAG] GetDemandedBits - remove ANY_EXTEND handling
Rely on SimplifyMultipleUseDemandedBits fallback instead.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index e191abb154fe..6c793afefe0d 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2226,19 +2226,6 @@ SDValue SelectionDAG::GetDemandedBits(SDValue V, const APInt &DemandedBits,
}
break;
}
- case ISD::ANY_EXTEND: {
- SDValue Src = V.getOperand(0);
- unsigned SrcBitWidth = Src.getScalarValueSizeInBits();
- // Being conservative here - only peek through if we only demand bits in the
- // non-extended source (even though the extended bits are technically
- // undef).
- if (DemandedBits.getActiveBits() > SrcBitWidth)
- break;
- APInt SrcDemandedBits = DemandedBits.trunc(SrcBitWidth);
- if (SDValue DemandedSrc = GetDemandedBits(Src, SrcDemandedBits))
- return getNode(ISD::ANY_EXTEND, SDLoc(V), V.getValueType(), DemandedSrc);
- break;
- }
}
return SDValue();
}
More information about the llvm-commits
mailing list