[llvm] [InstCombine] Optimise the expression `(C && A) || (!C && B)` with `FoldOrOfLogicalAnds` (PR #178438)
Andreas Jonson via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 13 14:38:36 PST 2026
================
----------------
andjo403 wrote:
the test bools2_logical_commute3 is still faulty and I assume that it is due to variables is swaped in match from legacy
```suggestion
bool MayNeedFreeze = SelInstOp0 && SelInstOp1 &&
match(SelInstOp1->getTrueValue(),
m_Not(m_Specific(SelInstOp0->getTrueValue())));
```
https://github.com/llvm/llvm-project/pull/178438
More information about the llvm-commits
mailing list