[llvm] [InstCombine] Reassociate commutative binops over select/phi/minmax (PR #187493)
Mitch Briles via llvm-commits
llvm-commits at lists.llvm.org
Sat May 23 17:06:12 PDT 2026
================
@@ -613,6 +633,12 @@ bool InstCombinerImpl::SimplifyAssociativeOrCommutative(BinaryOperator &I) {
Value *B = Op1->getOperand(0);
Value *C = Op1->getOperand(1);
+ if (tryReassociateAndFoldSymmetricPair(I, *Op1, B, C, A)) {
----------------
MitchBriles wrote:
Thanks. The helper is now more restrictive with these flags.
https://github.com/llvm/llvm-project/pull/187493
More information about the llvm-commits
mailing list