[llvm] [X86] Allow rotate to be affected by modulo shift (PR #156684)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 3 08:09:27 PDT 2025
AZero13 wrote:
> Since rotates and funnel shifts explicitly define they use modulo amount as part of their ISD node we can help everyone by doing some of this as a generic DAGCombiner fold. The tryShiftAmountMod is mainly to help with lowering from ISD shift nodes which don't have modulo behavior, to the x86 shift instructions which do.
True, but that is probablt best for another PR. Also, we call this for rotr in aarch64. Also, I am not sure that replacing 31 - with neg is best on all platforms, because I do not know if other platforms don't have reverse subtract. I know arm does but arm also is better off with neg too.
https://github.com/llvm/llvm-project/pull/156684
More information about the llvm-commits
mailing list