[PATCH] D136582: [InstCombine] fold sub pattern to and

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 24 10:54:50 PDT 2022


spatel added a comment.

I don't know if it would have any effect on this patch, but we seem to be missing a constant-shrinking (DemandedBits) opportunity for sub nuw:
https://alive2.llvm.org/ce/z/7Lb_Dy

We can clear high-bits of the mask constant based on the highest bit set in the subtract constant.


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

https://reviews.llvm.org/D136582



More information about the llvm-commits mailing list