forked from OSchip/llvm-project
[TargetLowering] SimplifyDemandedVectorElts - don't alter DemandedElts mask
Fix potential issue with the ISD::INSERT_VECTOR_ELT case tweaking the DemandedElts mask instead of using a local copy - so later uses of the mask use the tweaked version..... Noticed while investigating adding zero/undef folding to SimplifyDemandedVectorElts and the altered DemandedElts mask was causing mismatches. llvm-svn: 348348
This commit is contained in:
parent
8a1b4f57c9
commit
d24730cdda
|
@ -1614,9 +1614,10 @@ bool TargetLowering::SimplifyDemandedVectorElts(
|
|||
unsigned Idx = CIdx->getZExtValue();
|
||||
if (!DemandedElts[Idx])
|
||||
return TLO.CombineTo(Op, Vec);
|
||||
DemandedElts.clearBit(Idx);
|
||||
|
||||
if (SimplifyDemandedVectorElts(Vec, DemandedElts, KnownUndef,
|
||||
APInt DemandedVecElts(DemandedElts);
|
||||
DemandedVecElts.clearBit(Idx);
|
||||
if (SimplifyDemandedVectorElts(Vec, DemandedVecElts, KnownUndef,
|
||||
KnownZero, TLO, Depth + 1))
|
||||
return true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue