From 8f6cea43e7455ff223eb1eb8f52c386802a9605d Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 17 Aug 2021 10:52:34 -0700 Subject: [PATCH] [RISCV] Use RISCV::RVVBitsPerBlock for RGK_ScalableVector in getRegisterBitWidth. I might be wrong, but I think this is should be width of the known min size we use for scalable vectors. It shouldn't scale with minimum vlen. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D107945 --- llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h index 95dacb1..7be85cf 100644 --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h @@ -66,7 +66,7 @@ public: ST->hasStdExtV() ? ST->getMinRVVVectorSizeInBits() : 0); case TargetTransformInfo::RGK_ScalableVector: return TypeSize::getScalable( - ST->hasStdExtV() ? ST->getMinRVVVectorSizeInBits() : 0); + ST->hasStdExtV() ? RISCV::RVVBitsPerBlock : 0); } llvm_unreachable("Unsupported register kind"); -- 2.7.4