Skip to content

Commit 558ee58

Browse files
committed
[mlir] Fix -Wunused-but-set-variable in -DLLVM_ENABLE_ASSERTIONS=off build. NFC
1 parent 5022511 commit 558ee58

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

mlir/lib/Dialect/Vector/VectorTransforms.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -539,11 +539,8 @@ generateTransferOpSlices(Type shapedElementType, VectorType vectorType,
539539
// 'vector<2x1x2x4xf32>'. The memref rank is 3, and the effective
540540
// vector rank is 4 - 2 = 2, and so 'indexOffset' = 3 - 2 = 1.
541541
//
542-
unsigned vectorRank = vectorType.getRank();
543-
if (auto sourceVectorElementType = shapedElementType.dyn_cast<VectorType>()) {
544-
assert(vectorRank >= sourceVectorElementType.getRank());
545-
vectorRank -= sourceVectorElementType.getRank();
546-
}
542+
if (auto sourceVectorElementType = shapedElementType.dyn_cast<VectorType>())
543+
assert(vectorType.getRank() >= sourceVectorElementType.getRank());
547544
auto isBroadcast = [](AffineExpr expr) {
548545
if (auto constExpr = expr.dyn_cast<AffineConstantExpr>())
549546
return constExpr.getValue() == 0;

0 commit comments

Comments
 (0)