forked from OSchip/llvm-project
[InstCombine] SimplifyDemandedUseBits - add TODO to remove shl node if we only demand known sign bits of the shift source
Similar to what we already perform for ashr/lshr
This commit is contained in:
parent
5e90224839
commit
5909c67883
|
@ -563,6 +563,9 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
|
|||
DemandedMask, Known))
|
||||
return R;
|
||||
|
||||
// TODO: If we only want bits that already match the signbit then we don't
|
||||
// need to shift.
|
||||
|
||||
uint64_t ShiftAmt = SA->getLimitedValue(BitWidth-1);
|
||||
APInt DemandedMaskIn(DemandedMask.lshr(ShiftAmt));
|
||||
|
||||
|
|
Loading…
Reference in New Issue