[llvm] [VPlan] Simplify (X && Y) || (X && !Y) -> X. (PR #89386)
via llvm-commits
llvm-commits at lists.llvm.org
Mon May 13 10:41:04 PDT 2024
================
@@ -273,6 +309,24 @@ inline AllBinaryRecipe_match<Op0_t, Op1_t, Instruction::Or>
m_Or(const Op0_t &Op0, const Op1_t &Op1) {
return m_Binary<Instruction::Or, Op0_t, Op1_t>(Op0, Op1);
}
+
+template <typename Op0_t, typename Op1_t>
+inline LogicalRecipe_match<Op0_t, Op1_t, Instruction::Or, true, VPWidenRecipe,
+ VPReplicateRecipe, VPWidenCastRecipe, VPInstruction>
+m_c_LogicalOr(const Op0_t &Op0, const Op1_t &Op1) {
+ return LogicalRecipe_match<Op0_t, Op1_t, Instruction::Or, true, VPWidenRecipe,
+ VPReplicateRecipe, VPWidenCastRecipe,
+ VPInstruction>(Op0, Op1);
+}
+
+template <typename Op0_t, typename Op1_t>
+inline LogicalRecipe_match<Op0_t, Op1_t, Instruction::And, true, VPWidenRecipe,
+ VPReplicateRecipe, VPWidenCastRecipe, VPInstruction>
----------------
ayalz wrote:
Are all these recipes relevant?
https://github.com/llvm/llvm-project/pull/89386
More information about the llvm-commits
mailing list