[PATCH] D126617: [InstCombine] Optimize shl+lshr+and conversion pattern

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 31 08:06:53 PDT 2022


bcl5980 added a comment.

In D126617#3547120 <https://reviews.llvm.org/D126617#3547120>, @spatel wrote:

> I still think we should split this patch up as 2 independent transforms.
>
> The opposite shifts transform doesn't seem like it should be a power-of-2-mask transform. Can we handle that using demanded bits instead? Double-check (you can pre-commit more tests as needed), but I don't think this patch will handle these related folds:
> https://alive2.llvm.org/ce/z/SNmj5M

Thanks for the mention. Is this transform you want ?
https://alive2.llvm.org/ce/z/-C8L9U


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

https://reviews.llvm.org/D126617



More information about the llvm-commits mailing list