Skip to content

Commit 7b29458

Browse files
boomanaiden154Honey Goyal
authored andcommitted
[MLIR][XeVM] Fix unused variable warning in 66134e7 (llvm#171171)
Inline the variable only used in an assert per the LLVM coding standards.
1 parent 1ab5c00 commit 7b29458

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mlir/lib/Conversion/XeGPUToXeVM/XeGPUToXeVM.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -682,9 +682,8 @@ class LoadStoreMatrixToXeVMPattern : public OpConversionPattern<OpType> {
682682
// Some transforms may leave unit dimension in the 2D vector, adaptors do
683683
// not catch it for results.
684684
if (auto vecType = dyn_cast<VectorType>(resType)) {
685-
auto nonUnitDims = llvm::count_if(vecType.getShape(),
686-
[](int64_t d) { return d != 1; });
687-
assert(nonUnitDims <= 1 &&
685+
assert(llvm::count_if(vecType.getShape(),
686+
[](int64_t d) { return d != 1; }) <= 1 &&
688687
"Expected either 1D vector or nD with unit dimensions");
689688
resType = VectorType::get({vecType.getNumElements()},
690689
vecType.getElementType());

0 commit comments

Comments
 (0)