Skip to content

Commit 918d719

Browse files
committed
Use converted type to generate constant.
1 parent c9b35c8 commit 918d719

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static Value createLinalgBodyCalculationForElementwiseOp(
6161

6262
if (isa<tosa::AbsOp>(op) && isa<IntegerType>(elementTy)) {
6363
auto zero = rewriter.create<arith::ConstantOp>(
64-
loc, rewriter.getZeroAttr(elementTy));
64+
loc, rewriter.getZeroAttr(convertedElementTy));
6565
auto neg = rewriter.create<arith::SubIOp>(loc, zero, args[0]);
6666
return rewriter.create<arith::MaxSIOp>(loc, args[0], neg);
6767
}

0 commit comments

Comments
 (0)