[llvm] e6d8636 - [SVE] Remove calls to VectorType::getNumElements from Bitcode

Christopher Tetreault via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 23 13:25:35 PDT 2020


Author: Christopher Tetreault
Date: 2020-06-23T13:21:40-07:00
New Revision: e6d8636935e13f57b52c7dcf81f5c4576e2446f5

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

LOG: [SVE] Remove calls to VectorType::getNumElements from Bitcode

Reviewers: efriedma, evgeny777, tejohnson, david-arm, kmclaughlin

Reviewed By: david-arm

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82209

Added: 
    

Modified: 
    llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 653d7f96e3ef..e9cf5af00da2 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -961,7 +961,7 @@ void ModuleBitcodeWriter::writeTypeTable() {
       // VECTOR [numelts, eltty] or
       //        [numelts, eltty, scalable]
       Code = bitc::TYPE_CODE_VECTOR;
-      TypeVals.push_back(VT->getNumElements());
+      TypeVals.push_back(VT->getElementCount().Min);
       TypeVals.push_back(VE.getTypeID(VT->getElementType()));
       if (isa<ScalableVectorType>(VT))
         TypeVals.push_back(true);


        


More information about the llvm-commits mailing list