Skip to content

Commit 0de60b5

Browse files
committed
[mlir] Fix mlir build break due to warning when NDEBUG is not set
1 parent 05d74db commit 0de60b5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,7 @@ class VectorTransferConversion : public ConvertToLLVMPattern {
11531153
if (memrefVectorElementType.getElementType() !=
11541154
xferOp.getVectorType().getElementType())
11551155
return failure();
1156+
#ifndef NDEBUG
11561157
// Check that memref vector type is a suffix of 'vectorType.
11571158
unsigned memrefVecEltRank = memrefVectorElementType.getRank();
11581159
unsigned resultVecRank = xferOp.getVectorType().getRank();
@@ -1165,6 +1166,7 @@ class VectorTransferConversion : public ConvertToLLVMPattern {
11651166
assert(memrefVecEltShape[i] != resultVecShape[rankOffset + i] &&
11661167
"memref vector element shape should match suffix of vector "
11671168
"result shape.");
1169+
#endif // ifndef NDEBUG
11681170
}
11691171

11701172
// 1. Get the source/dst address as an LLVM vector pointer.

0 commit comments

Comments
 (0)