[llvm] [AArch64] Lower disjoint_or+not to eon. (PR #147279)

Ricardo Jesus via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 8 05:30:09 PDT 2025


================
@@ -1254,6 +1254,16 @@ def fminnum_nnan : PatFrag<(ops node:$Rn, node:$Rm),
   return N->getFlags().hasNoNaNs();
   }]>;
 
+// Match disjoint or nodes.
+def or_disjoint : PatFrag<(ops node:$lhs, node:$rhs),
+                          (or node:$lhs, node:$rhs), [{
+  return N->getFlags().hasDisjoint();
+}]> {
+  let GISelPredicateCode = [{
+    return mi_match(MI, MRI, m_GDisjointOr(m_Reg(), m_Reg()));
+  }];
+}
----------------
rj-jesus wrote:

I've now moved `or_disjoint` to TargetSelectionDAG.td and added `xor_like`. I opted to leave `or_disjoint` defined as is (just in the new location) as I could see it being useful on its own, but please let me know if you'd rather I combine it into `xor_like`.

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


More information about the llvm-commits mailing list