@@ -543,14 +543,14 @@ struct GenSemiRingReduction : public OpRewritePattern<GenericOp> {
543
543
if (!op.hasPureTensorSemantics () || op.getNumDpsInputs () != 1 ||
544
544
op.getNumReductionLoops () == 0 || op.getNumResults () != 1 )
545
545
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 );
548
548
if (!isSparseTensor (inp))
549
549
return failure ();
550
550
// 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 ();
554
554
if (!isa<arith::AndIOp, arith::MulIOp, arith::MulFOp, arith::MinimumFOp,
555
555
arith::MinSIOp, arith::MinUIOp, arith::MaximumFOp, arith::MaxSIOp,
556
556
arith::MaxUIOp>(red))
@@ -592,7 +592,7 @@ struct GenSemiRingReduction : public OpRewritePattern<GenericOp> {
592
592
IRMapping irMap;
593
593
irMap.map (red->getOperand (0 ), region->getArgument (0 ));
594
594
irMap.map (red->getOperand (1 ), region->getArgument (1 ));
595
- auto cloned = rewriter.clone (*red, irMap);
595
+ auto * cloned = rewriter.clone (*red, irMap);
596
596
rewriter.create <sparse_tensor::YieldOp>(loc, cloned->getResult (0 ));
597
597
rewriter.setInsertionPointAfter (custom);
598
598
rewriter.replaceOp (red, custom.getResult ());
0 commit comments