[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:15 PDT 2025


================
@@ -439,6 +460,102 @@ m_DerivedIV(const Op0_t &Op0, const Op1_t &Op1, const Op2_t &Op2) {
   return VPDerivedIV_match<Op0_t, Op1_t, Op2_t>({Op0, Op1, Op2});
 }
 
+template <typename Opnd_t> struct Argument_match {
+  unsigned OpI;
+  Opnd_t Val;
+
+  Argument_match(unsigned OpIdx, const Opnd_t &V) : OpI(OpIdx), Val(V) {}
+
+  template <typename OpTy> bool match(OpTy *V) const {
+    if (const auto *R = dyn_cast<VPWidenIntrinsicRecipe>(V))
----------------
lukel97 wrote:

Done in f2cc512e7354acf80e51af363bdffe3df3d3e954, thanks

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


More information about the llvm-commits mailing list