Skip to content

Commit

Permalink
[mlir][ArmSVE] Avoid UBSAN issue with VectorType::Builder (NFC)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
MacDue committed Oct 12, 2023
1 parent 0aacc21 commit b44b349
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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 =
Expand Down

0 comments on commit b44b349

Please sign in to comment.