Skip to content

Commit 61f64d1

Browse files
committed
Apply clang-tidy fixes for llvm-qualified-auto in SparseTensorRewriting.cpp (NFC)
1 parent 56c385c commit 61f64d1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -543,14 +543,14 @@ struct GenSemiRingReduction : public OpRewritePattern<GenericOp> {
543543
if (!op.hasPureTensorSemantics() || op.getNumDpsInputs() != 1 ||
544544
op.getNumReductionLoops() == 0 || op.getNumResults() != 1)
545545
return failure();
546-
auto inp = op.getDpsInputOperand(0);
547-
auto init = op.getDpsInitOperand(0);
546+
auto *inp = op.getDpsInputOperand(0);
547+
auto *init = op.getDpsInitOperand(0);
548548
if (!isSparseTensor(inp))
549549
return failure();
550550
// Look for direct x = x OP y for semi-ring ready reductions.
551-
auto red = cast<linalg::YieldOp>(op.getRegion().front().getTerminator())
552-
.getOperand(0)
553-
.getDefiningOp();
551+
auto *red = cast<linalg::YieldOp>(op.getRegion().front().getTerminator())
552+
.getOperand(0)
553+
.getDefiningOp();
554554
if (!isa<arith::AndIOp, arith::MulIOp, arith::MulFOp, arith::MinimumFOp,
555555
arith::MinSIOp, arith::MinUIOp, arith::MaximumFOp, arith::MaxSIOp,
556556
arith::MaxUIOp>(red))
@@ -592,7 +592,7 @@ struct GenSemiRingReduction : public OpRewritePattern<GenericOp> {
592592
IRMapping irMap;
593593
irMap.map(red->getOperand(0), region->getArgument(0));
594594
irMap.map(red->getOperand(1), region->getArgument(1));
595-
auto cloned = rewriter.clone(*red, irMap);
595+
auto *cloned = rewriter.clone(*red, irMap);
596596
rewriter.create<sparse_tensor::YieldOp>(loc, cloned->getResult(0));
597597
rewriter.setInsertionPointAfter(custom);
598598
rewriter.replaceOp(red, custom.getResult());

0 commit comments

Comments
 (0)