[PATCH] D91364: [InstCombine] fold low-bit mask of sext-in-reg

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 09:52:07 PST 2020


spatel added a comment.

In D91364#2391743 <https://reviews.llvm.org/D91364#2391743>, @lebedev.ri wrote:

> I mildly prefer the other approach (D91343 <https://reviews.llvm.org/D91343>), because it doesn't hardcode the `and` instruction.

Right, that's more flexible with potentially more compute known bits cost. 
@Bhramar.vatsa - I committed the baseline tests shown here with 8a1e636 <https://reviews.llvm.org/rG8a1e6366d0f6c8771825e4589710ffe06318786f>. Please update/rebase your patch and confirm that you get the same diffs. I think you can reduce the code a bit too based on the `match` code shown here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91364/new/

https://reviews.llvm.org/D91364



More information about the llvm-commits mailing list