[llvm] [InstCombine] Optimize addition of selects (PR #224477)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 27 09:30:15 PDT 2026


dtcxzyw wrote:

> Do we have a more generalized heuristic to reorder the operands in an addition tree?

I still expect a general way to reuse the logic in https://github.com/llvm/llvm-project/pull/224478. Can we reassociate the expr to put two selects in the same binop in `SimplifyAssociativeOrCommutative`, if one of the conditions can be implied by another?


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


More information about the llvm-commits mailing list