[llvm] [VPlan] Improve code in VPWidenIntrinsic (NFC) (PR #141936)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Thu May 29 05:14:24 PDT 2025


https://github.com/artagnon created https://github.com/llvm/llvm-project/pull/141936

None

>From 50bfaaad9d7f0dbeed6042a32fe84a85253f5945 Mon Sep 17 00:00:00 2001
From: Ramkumar Ramachandra <r at artagnon.com>
Date: Thu, 29 May 2025 14:02:54 +0200
Subject: [PATCH] [VPlan] Improve code in VPWidenIntrinsic (NFC)

---
 llvm/lib/Transforms/Vectorize/VPlan.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 16c461cd60919..0a095fe84d07d 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -1425,10 +1425,9 @@ class VPWidenIntrinsicRecipe : public VPRecipeWithIRFlags, public VPIRMetadata {
   VPWidenIntrinsicRecipe *clone() override {
     if (Value *CI = getUnderlyingValue())
       return new VPWidenIntrinsicRecipe(*cast<CallInst>(CI), VectorIntrinsicID,
-                                        {op_begin(), op_end()}, ResultTy,
-                                        getDebugLoc());
-    return new VPWidenIntrinsicRecipe(VectorIntrinsicID, {op_begin(), op_end()},
-                                      ResultTy, getDebugLoc());
+                                        operands(), ResultTy, getDebugLoc());
+    return new VPWidenIntrinsicRecipe(VectorIntrinsicID, operands(), ResultTy,
+                                      getDebugLoc());
   }
 
   VP_CLASSOF_IMPL(VPDef::VPWidenIntrinsicSC)



More information about the llvm-commits mailing list