[llvm] [VPlan] Simplify select !c, x, y -> select c, y, x (PR #147268)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 7 06:14:55 PDT 2025
================
@@ -491,6 +485,15 @@ m_Select(const Op0_t &Op0, const Op1_t &Op1, const Op2_t &Op2) {
{Op0, Op1, Op2});
}
+template <typename Op0_t>
+inline match_combine_or<UnaryVPInstruction_match<Op0_t, VPInstruction::Not>,
+ AllBinaryRecipe_match<int_pred_ty<is_all_ones>, Op0_t,
+ Instruction::Xor, true>>
+m_Not(const Op0_t &Op0) {
----------------
lukel97 wrote:
Yes I had the same thought, or just to remove VPInstruction::Not entirely. I can explore this in a separate PR?
https://github.com/llvm/llvm-project/pull/147268
More information about the llvm-commits
mailing list