[llvm] f1e1c3c - [RISCV] Replace two calls to getMinRVVVectorSizeInBits in fixed length lowering [nfc]

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 24 13:01:04 PDT 2022


Author: Philip Reames
Date: 2022-06-24T13:00:57-07:00
New Revision: f1e1c3ce772565d77a920119dcd0b43622059fb1

URL: https://github.com/llvm/llvm-project/commit/f1e1c3ce772565d77a920119dcd0b43622059fb1
DIFF: https://github.com/llvm/llvm-project/commit/f1e1c3ce772565d77a920119dcd0b43622059fb1.diff

LOG: [RISCV] Replace two calls to getMinRVVVectorSizeInBits in fixed length lowering [nfc]

Both of these are only reached if useRVVForFixedLengthVectors is true.  Given that, we know that getRealMinVLen() == getMinRVVVectorSizeInBits().

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index b3ac308f1dd1..3f608d711d79 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -1526,7 +1526,7 @@ static bool useRVVForFixedLengthVectorVT(MVT VT,
   if (VT.getFixedSizeInBits() > 1024 * 8)
     return false;
 
-  unsigned MinVLen = Subtarget.getMinRVVVectorSizeInBits();
+  unsigned MinVLen = Subtarget.getRealMinVLen();
 
   MVT EltVT = VT.getVectorElementType();
 
@@ -1592,7 +1592,7 @@ static MVT getContainerForFixedLengthVector(const TargetLowering &TLI, MVT VT,
           useRVVForFixedLengthVectorVT(VT, Subtarget)) &&
          "Expected legal fixed length vector!");
 
-  unsigned MinVLen = Subtarget.getMinRVVVectorSizeInBits();
+  unsigned MinVLen = Subtarget.getRealMinVLen();
   unsigned MaxELen = Subtarget.getELEN();
 
   MVT EltVT = VT.getVectorElementType();


        


More information about the llvm-commits mailing list