@@ -136,6 +136,7 @@ Value warpReduceHelper(RewriterBase &rewriter, Location loc, Value acc,
136136 Value warpReduce =
137137 TypeSwitch<mlir::Operation *, Value>(reduceOp)
138138 .Case <arith::AddFOp, arith::AddIOp, arith::MulFOp, arith::MulIOp,
139+ arith::MaxSIOp, arith::MaxUIOp, arith::MinSIOp, arith::MinUIOp,
139140 arith::MaxNumFOp, arith::MinNumFOp>([&](auto groupOp) {
140141 return createSPIRVGroupOp<
141142 SPIRVArithmeticGroupOpTy<decltype (groupOp)>>(
@@ -182,9 +183,11 @@ bool TargetInfo::warpReduce(RewriterBase &rewriter, Location loc,
182183 reduceOp->getOperand (1 ) != block.getArgument (1 ))
183184 return false ;
184185
185- auto supportedOp = isa<arith::AddFOp, arith::AddIOp, arith::MulFOp,
186- arith::MulIOp, arith::MaxNumFOp, arith::MinNumFOp,
187- arith::AndIOp, arith::OrIOp, arith::XOrIOp>(reduceOp);
186+ auto supportedOp =
187+ isa<arith::AddFOp, arith::AddIOp, arith::MulFOp, arith::MulIOp,
188+ arith::MaxSIOp, arith::MaxUIOp, arith::MinSIOp, arith::MinUIOp,
189+ arith::MaxNumFOp, arith::MinNumFOp, arith::AndIOp, arith::OrIOp,
190+ arith::XOrIOp>(reduceOp);
188191
189192 if (!supportedOp)
190193 return false ;
0 commit comments