summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-06-02 10:12:55 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-06-02 10:12:55 +0000
commit88522ce38892808818c835497e850fba6ae3448c (patch)
tree998df7d19fd8bf3bb858c39977aed48db35598b2 /llvm/lib/CodeGen
parent30a6caa3e72de6e85c581c6c4e658798e4c0764e (diff)
downloadbcm5719-llvm-88522ce38892808818c835497e850fba6ae3448c.tar.gz
bcm5719-llvm-88522ce38892808818c835497e850fba6ae3448c.zip
[TargetLowering] SimplifyDemandedBits - don't use OriginalDemanded variables in analysis.
These might have been replaced in multiple use cases. llvm-svn: 362322
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 43251d06ef1..785530b3605 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -676,27 +676,27 @@ bool TargetLowering::SimplifyDemandedBits(
// 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) {
OpenPOWER on IntegriCloud