[llvm] [IR] Return 'unsigned' from ScalableVectorType::getMinNumElements(). (PR #98103)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 18:25:25 PDT 2024
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/98103
The underlying ElementQuantity field is 'unsigned'. The similar FixedVectorType::getNumElements() returns 'unsigned'.
>From b99cb23fc1d4959e99c952c93515911d2c4aa560 Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Mon, 8 Jul 2024 16:40:53 -0700
Subject: [PATCH] [IR] Return 'unsigned' from
ScalableVectorType::getMinNumElements().
FixedVectorType::getNumElements() returns 'unsigned' and the underlying
ElementQuantity field is 'unsigned'.
---
llvm/include/llvm/IR/DerivedTypes.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/include/llvm/IR/DerivedTypes.h b/llvm/include/llvm/IR/DerivedTypes.h
index 443fb7de3b821..01f76d4932780 100644
--- a/llvm/include/llvm/IR/DerivedTypes.h
+++ b/llvm/include/llvm/IR/DerivedTypes.h
@@ -631,7 +631,7 @@ class ScalableVectorType : public VectorType {
/// Get the minimum number of elements in this vector. The actual number of
/// elements in the vector is an integer multiple of this value.
- uint64_t getMinNumElements() const { return ElementQuantity; }
+ unsigned getMinNumElements() const { return ElementQuantity; }
static bool classof(const Type *T) {
return T->getTypeID() == ScalableVectorTyID;
More information about the llvm-commits
mailing list