[PATCH] D136582: [InstCombine] fold sub pattern to and
chenglin.bi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 24 15:16:46 PDT 2022
bcl5980 added a comment.
In D136582#3880098 <https://reviews.llvm.org/D136582#3880098>, @spatel wrote:
> 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.
Yeah, I also find the shrinking. And that part has no effect on this patch. Condition 1/3 don't care any high-bits for C2.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136582/new/
https://reviews.llvm.org/D136582
More information about the llvm-commits
mailing list