[llvm] [VPlan] Simplify (X && Y) || (X && !Y) -> X. (PR #89386)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue May 14 03:54:50 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,
----------------
fhahn wrote:
Just updated the PR based on the new LogicalAnd, thanks!
https://github.com/llvm/llvm-project/pull/89386
More information about the llvm-commits
mailing list