@@ -330,7 +330,8 @@ bool vector::isLinearizableVector(VectorType type) {
330
330
331
331
Value vector::createReadOrMaskedRead (OpBuilder &builder, Location loc,
332
332
Value source, ArrayRef<int64_t > readShape,
333
- Value padValue, bool enableMasking) {
333
+ Value padValue,
334
+ bool useInBoundsInsteadOfMasking) {
334
335
assert (llvm::none_of (readShape,
335
336
[](int64_t s) { return s == ShapedType::kDynamic ; }) &&
336
337
" expected static shape" );
@@ -344,7 +345,7 @@ Value vector::createReadOrMaskedRead(OpBuilder &builder, Location loc,
344
345
int64_t readRank = readShape.size ();
345
346
auto zero = builder.create <arith::ConstantIndexOp>(loc, 0 );
346
347
SmallVector<bool > inBoundsVal (readRank, true );
347
- if (!enableMasking ) {
348
+ if (!useInBoundsInsteadOfMasking ) {
348
349
// Update the inBounds attribute.
349
350
for (unsigned i = 0 ; i < readRank; i++)
350
351
inBoundsVal[i] = (sourceShape[i] == readShape[i]) &&
@@ -358,7 +359,7 @@ Value vector::createReadOrMaskedRead(OpBuilder &builder, Location loc,
358
359
/* padding=*/ padValue,
359
360
/* inBounds=*/ inBoundsVal);
360
361
361
- if (llvm::equal (readShape, sourceShape) || !enableMasking )
362
+ if (llvm::equal (readShape, sourceShape) || !useInBoundsInsteadOfMasking )
362
363
return transferReadOp;
363
364
SmallVector<OpFoldResult> mixedSourceDims =
364
365
tensor::getMixedSizes (builder, loc, source);
0 commit comments