From 366a88ccc787d9992740f2e557671d0034a89218 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 16 Jun 2025 10:37:19 -0700 Subject: [PATCH] [RISCV] Use RISCV::RVVBitsPerBlock instead of 64 in getLMUL1VT. NFC --- llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 2 +- llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp index 7cfada6c0601c..779786fa400fc 100644 --- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp +++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp @@ -3499,7 +3499,7 @@ getVSlideup(SelectionDAG &DAG, const RISCVSubtarget &Subtarget, const SDLoc &DL, } static MVT getLMUL1VT(MVT VT) { - assert(VT.getVectorElementType().getSizeInBits() <= 64 && + assert(VT.getVectorElementType().getSizeInBits() <= RISCV::RVVBitsPerBlock && "Unexpected vector MVT"); return MVT::getScalableVectorVT( VT.getVectorElementType(), diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp index fcc9d3977e5cd..0093c92ea5ef0 100644 --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp @@ -604,7 +604,7 @@ InstructionCost RISCVTTIImpl::getSlideCost(FixedVectorType *Tp, // Consolidate! static MVT getLMUL1VT(MVT VT) { - assert(VT.getVectorElementType().getSizeInBits() <= 64 && + assert(VT.getVectorElementType().getSizeInBits() <= RISCV::RVVBitsPerBlock && "Unexpected vector MVT"); return MVT::getScalableVectorVT( VT.getVectorElementType(),