[llvm] [ValueTracking] Add rotate idiom to haveNoCommonBitsSet special cases (PR #122165)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 17:13:47 PST 2025


AlexMaclean wrote:

> @AlexMaclean, do you think that this should also be done at the [SelectionDAG level](https://github.com/llvm/llvm-project/blob/598106d88a0fe5f4ac7767e8de63cb721e218e33/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp#L6008) (using helpful framework introduced with [5874874c2](https://github.com/llvm/llvm-project/commit/5874874c24720dc24fde12327f81369ef4af4e0b))?

Good point, I've opted to generalize the rotate matching in DAGCombiner to ensure all valid rotate idioms can be folded when using an 'add' instead of an 'or'. See https://github.com/llvm/llvm-project/pull/125612

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


More information about the llvm-commits mailing list