[llvm] r362322 - [TargetLowering] SimplifyDemandedBits - don't use OriginalDemanded variables in analysis.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 2 03:12:55 PDT 2019
Author: rksimon
Date: Sun Jun 2 03:12:55 2019
New Revision: 362322
URL: http://llvm.org/viewvc/llvm-project?rev=362322&view=rev
Log:
[TargetLowering] SimplifyDemandedBits - don't use OriginalDemanded variables in analysis.
These might have been replaced in multiple use cases.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=362322&r1=362321&r2=362322&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Sun Jun 2 03:12:55 2019
@@ -676,27 +676,27 @@ bool TargetLowering::SimplifyDemandedBit
// If index isn't constant, assume we need all vector elements AND the
// inserted element.
- APInt DemandedVecElts(OriginalDemandedElts);
+ APInt DemandedVecElts(DemandedElts);
if (CIdx && CIdx->getAPIntValue().ult(VecVT.getVectorNumElements())) {
unsigned Idx = CIdx->getZExtValue();
DemandedVecElts.clearBit(Idx);
// Inserted element is not required.
- if (!OriginalDemandedElts[Idx])
+ if (!DemandedElts[Idx])
return TLO.CombineTo(Op, Vec);
}
KnownBits KnownScl;
unsigned NumSclBits = Scl.getScalarValueSizeInBits();
- APInt DemandedSclBits = OriginalDemandedBits.zextOrTrunc(NumSclBits);
+ APInt DemandedSclBits = DemandedBits.zextOrTrunc(NumSclBits);
if (SimplifyDemandedBits(Scl, DemandedSclBits, KnownScl, TLO, Depth + 1))
return true;
Known = KnownScl.zextOrTrunc(BitWidth, false);
KnownBits KnownVec;
- if (SimplifyDemandedBits(Vec, OriginalDemandedBits, DemandedVecElts,
- KnownVec, TLO, Depth + 1))
+ if (SimplifyDemandedBits(Vec, DemandedBits, DemandedVecElts, KnownVec, TLO,
+ Depth + 1))
return true;
if (!!DemandedVecElts) {
More information about the llvm-commits
mailing list