Skip to content

Commit a24d857

Browse files
committed
VectorType vecToReadTy -> VectorType *vecToReadTy
1 parent 2845025 commit a24d857

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

mlir/include/mlir/Dialect/Vector/Utils/VectorUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ bool isLinearizableVector(VectorType type);
226226
///
227227
/// Note: all read offsets are set to 0.
228228
Value createReadOrMaskedRead(OpBuilder &builder, Location loc, Value source,
229-
VectorType &vecToReadTy,
229+
const VectorType &vecToReadTy,
230230
std::optional<Value> padValue = std::nullopt,
231231
bool useInBoundsInsteadOfMasking = false);
232232

mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,8 @@ bool vector::isLinearizableVector(VectorType type) {
317317
}
318318

319319
Value vector::createReadOrMaskedRead(OpBuilder &builder, Location loc,
320-
Value source, VectorType &vecToReadTy,
320+
Value source,
321+
const VectorType &vecToReadTy,
321322
std::optional<Value> padValue,
322323
bool useInBoundsInsteadOfMasking) {
323324
assert(!llvm::is_contained(vecToReadTy.getScalableDims(),
@@ -361,7 +362,7 @@ Value vector::createReadOrMaskedRead(OpBuilder &builder, Location loc,
361362
? memref::getMixedSizes(builder, loc, source)
362363
: tensor::getMixedSizes(builder, loc, source);
363364

364-
auto maskType = vecToReadTy.clone(builder.getI1Type());
365+
auto maskType = vecToReadTy.cloneWith(/*shape=*/{}, builder.getI1Type());
365366
Value mask =
366367
vector::CreateMaskOp::create(builder, loc, maskType, mixedSourceDims);
367368
return mlir::vector::maskOperation(builder, transferReadOp, mask)

0 commit comments

Comments
 (0)