[mlir][sparse] fix build issue with unused local under opt builds
authorAart Bik <ajcbik@google.com>
Tue, 3 May 2022 21:49:08 +0000 (14:49 -0700)
committerAart Bik <ajcbik@google.com>
Tue, 3 May 2022 21:55:32 +0000 (14:55 -0700)
Reviewed By: rdzhabarov

Differential Revision: https://reviews.llvm.org/D124883

mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp

index 3001f41..5b4b89b 100644 (file)
@@ -798,8 +798,7 @@ static void genTensorStore(Merger &merger, CodeGen &codegen,
     if (!rhs) {
       // Only unary and binary are allowed to return uninitialized rhs
       // to indicate missing output.
-      Kind kind = merger.exp(exp).kind;
-      assert(kind == kUnary || kind == kBinary);
+      assert(merger.exp(exp).kind == kUnary || merger.exp(exp).kind == kBinary);
     } else {
       genInsertionStore(codegen, rewriter, op, t, rhs);
     }