[llvm] [DAGCombiner] Attempt to fold 'add' nodes to funnel-shift or rotate (PR #125612)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 12 10:25:30 PDT 2025


AlexMaclean wrote:

> > please can we get some alive2 coverage for these? I'd still be a lot more comfortable with getting the new tests committed with existing codegen and see how far the haveNoCommonBitsSetCommutative improvements would get us tbh.
> 
> Here are alive2 proofs for the cases this PR adds: https://alive2.llvm.org/ce/z/yCPZtE
> 
> Adding the support in `haveNoCommonBitsSetCommutative` seems like it will require essentially reproducing the logic in `MatchRotate`. Even with the match syntax this seems like it will be pretty significant if we want to cover all the cases. Is there anything you've found that is incorrect in the proposed implementation to handle ADD nodes directly?

@RKSimon ping on this?

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


More information about the llvm-commits mailing list