[llvm] [SLP] NFC. Use Value instead of template. (PR #115440)

Han-Kuan Chen via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 00:05:58 PST 2024


https://github.com/HanKuanChen created https://github.com/llvm/llvm-project/pull/115440

None

>From 63c20af072a77b4dac03cb647806ce2d9aae0c01 Mon Sep 17 00:00:00 2001
From: Han-Kuan Chen <hankuan.chen at sifive.com>
Date: Fri, 8 Nov 2024 00:05:19 -0800
Subject: [PATCH] [SLP] NFC. Use Value instead of template.

---
 llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index b2f677fb84f983..d9437af7641e91 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -239,7 +239,7 @@ static bool isValidElementType(Type *Ty) {
 /// returns the type of its value operand, for Cmp - the types of the compare
 /// operands and for insertelement - the type os the inserted operand.
 /// Otherwise, just the type of the value is returned.
-template <typename T> static Type *getValueType(T *V) {
+static Type *getValueType(Value *V) {
   if (auto *SI = dyn_cast<StoreInst>(V))
     return SI->getValueOperand()->getType();
   if (auto *CI = dyn_cast<CmpInst>(V))



More information about the llvm-commits mailing list