[llvm] [InstCombine] Fold binary operator into select, when one of the opera… (PR #166241)

Andreas Jonson via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 6 10:12:13 PST 2025


andjo403 wrote:

as you mention Integrate the for arithmetic operations with a fast search it seems like foldBinOpIntoSelectOrPhi or FoldOpIntoSelect is only called for add/sub with one constant so maybe that can be something for you to continue with if it is not to compile time heavy.

also in foldBinOpIntoSelectOrPhi FoldOpIntoSelect is only called if the first operand is the select but do not think that is a must now that the second parameter is not always a constant.

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


More information about the llvm-commits mailing list