[llvm] [VPlan] Introduce m_c_Logical(And|Or), simplify x && true -> x (PR #180048)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 11 05:26:14 PST 2026


artagnon wrote:

> This now needs an update to main I think after #179426 landed

I'm actually thinking of closing this one: it's impossible to cover the patch with any additional tests, as:
1. VPInstruction::LogicalAnd is created by VPlan with a definite operand order. I tried to test with swapped operands, but failed.
2. simplifyRecipe already simplifies select !c, x, y -> select c, y, x.

Why should we add extra code that cannot be covered? The benefit would be purely NFC, and would allow us to write m_c_Logical(And|Or) with swapped operand orders: what do you think?

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


More information about the llvm-commits mailing list