[llvm] [VPlan] Simplify (X && Y) || (X && !Y) -> X. (PR #89386)

via llvm-commits llvm-commits at lists.llvm.org
Sun May 19 02:57:06 PDT 2024


================
@@ -270,9 +270,15 @@ m_Mul(const Op0_t &Op0, const Op1_t &Op1) {
 
 template <typename Op0_t, typename Op1_t>
 inline AllBinaryRecipe_match<Op0_t, Op1_t, Instruction::Or>
-m_Or(const Op0_t &Op0, const Op1_t &Op1) {
+m_BinaryOr(const Op0_t &Op0, const Op1_t &Op1) {
----------------
ayalz wrote:

Why/Is this distinction of `Binary` important, here - to contrast LogicalAnd below (i.e., IllogicalOr ;-), emphasizing `Bitwise` vs. Logical (i.e., those allowed to introduce UB vs. those that prevent it), or to accommodate Ternary and multi-ary Or's in the future. Worth updating recipe to print `binary-or` or `bitwise-or` rather than simply `or`?

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


More information about the llvm-commits mailing list