[llvm] [InstCombine] Fold `switch(rol(x, C1)) case C2:` to `switch(x) case rol(C2, -C1):` (PR #86307)

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 22 10:26:09 PDT 2024


goldsteinn wrote:

This change looks fine, although it would be nice if we had some helper generically detecting if an op is reversable so we could generalize all these cases.

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


More information about the llvm-commits mailing list