[llvm] [VPlan] Simplify vp.merge true, (or x, y), x -> vp.merge y, true, x (PR #135017)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 11 07:11:22 PDT 2025


================
@@ -136,11 +136,32 @@ template <typename LTy, typename RTy> struct match_combine_or {
   }
 };
 
+template <typename LTy, typename RTy> struct match_combine_and {
+  LTy L;
+  RTy R;
+
+  match_combine_and(const LTy &Left, const RTy &Right) : L(Left), R(Right) {}
+
+  template <typename ITy> bool match(ITy *V) const {
+    if (L.match(V))
+      if (R.match(V))
+        return true;
+    return false;
----------------
lukel97 wrote:

Done in f2cc512e7354acf80e51af363bdffe3df3d3e954

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


More information about the llvm-commits mailing list