Skip to content
Snippets Groups Projects
Commit 5909c678 authored by Simon Pilgrim's avatar Simon Pilgrim
Browse files

[InstCombine] SimplifyDemandedUseBits - add TODO to remove shl node if we only...

[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
parent 5e902248
No related branches found
No related tags found
No related merge requests found
......@@ -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));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment