[llvm] [InstComb] Fold ashr (xor x, y), x -> ashr y, x (PR #165866)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 31 08:10:29 PDT 2025


https://github.com/dtcxzyw requested changes to this pull request.

I don't like to special handle this case. It works because the number of active bits of x is never greater than x itself: https://alive2.llvm.org/ce/z/sYnoVM
All the patterns like `[la]shr (bitop x, y), x` can be simplified.


https://github.com/llvm/llvm-project/pull/165866


More information about the llvm-commits mailing list