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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 10:03:42 PST 2020


lebedev.ri added a comment.

In D91364#2391784 <https://reviews.llvm.org/D91364#2391784>, @spatel wrote:

> 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.

Ack.
But i think the pattern isn't *that* common, i would be surprised if this fires more than ~1k times as of vanilla test-suite.

> @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