[Mlir-commits] [mlir] b44b349 - [mlir][ArmSVE] Avoid UBSAN issue with VectorType::Builder (NFC)
Benjamin Maxwell
llvmlistbot at llvm.org
Thu Oct 12 09:53:09 PDT 2023
Author: Benjamin Maxwell
Date: 2023-10-12T16:52:33Z
New Revision: b44b3494f60296db6aca38a14cab061d9b747a0a
URL: https://github.com/llvm/llvm-project/commit/b44b3494f60296db6aca38a14cab061d9b747a0a
DIFF: https://github.com/llvm/llvm-project/commit/b44b3494f60296db6aca38a14cab061d9b747a0a.diff
LOG: [mlir][ArmSVE] Avoid UBSAN issue with VectorType::Builder (NFC)
This patch just avoids the underlying bug in VectorType::Builder, which
currently has incorrect copy/move constructors.
See https://lab.llvm.org/buildbot/#/builders/5/builds/37355
Added:
Modified:
mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp b/mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
index f54a26c27c2acad..92278c0d74d574d 100644
--- a/mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
+++ b/mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
@@ -117,7 +117,7 @@ struct SvboolConversionOpLowering : public ConvertOpToLLVMPattern<Op> {
auto extractOrInsertPosition = ArrayRef(index).drop_back();
auto sourceVector = rewriter.create<vector::ExtractOp>(
loc, source, extractOrInsertPosition);
- auto convertedType =
+ VectorType convertedType =
VectorType::Builder(llvm::cast<VectorType>(sourceVector.getType()))
.setDim(0, resultType.getShape().back());
auto convertedVector =
More information about the Mlir-commits
mailing list