[llvm] Add EVT::changeVectorElementCount and MVT:changeVectorElementCount (PR #182266)
Chaitanya Koparkar via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 04:52:12 PST 2026
================
@@ -108,6 +108,18 @@ namespace llvm {
return getVectorVT(Context, EltVT, getVectorElementCount());
}
+ /// Return a VT for a vector type whose attributes match ourselves
+ /// with the exception of the element count that is chosen by the caller.
+ EVT changeVectorElementCount(LLVMContext &Context, ElementCount EC) const {
----------------
ckoparkar wrote:
Oh yeah, good point. The underlying type doesn't change here so the Context should be available in the extended type when it's required. I'll fix this in a follow up.
https://github.com/llvm/llvm-project/pull/182266
More information about the llvm-commits
mailing list