OSDN Git Service

[SVE] Eliminate calls to default-false VectorType::get() from mlir
authorChristopher Tetreault <ctetreau@quicinc.com>
Thu, 28 May 2020 21:24:13 +0000 (14:24 -0700)
committerChristopher Tetreault <ctetreau@quicinc.com>
Thu, 28 May 2020 21:42:51 +0000 (14:42 -0700)
Reviewers: efriedma, ftynse, c-rhodes, david-arm, rriddle

Reviewed By: ftynse

Subscribers: tschuett, rkruppe, psnobl, mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, jurahul, llvm-commits

Tags: #llvm

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

mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp

index 3a055d0..2c6478d 100644 (file)
@@ -1925,7 +1925,8 @@ LLVMType LLVMType::setStructTyBody(LLVMType structType,
 LLVMType LLVMType::getVectorTy(LLVMType elementType, unsigned numElements) {
   // Lock access to the dialect as this may modify the LLVM context.
   return getLocked(&elementType.getDialect(), [=] {
-    return llvm::VectorType::get(elementType.getUnderlyingType(), numElements);
+    return llvm::FixedVectorType::get(elementType.getUnderlyingType(),
+                                      numElements);
   });
 }