[Mlir-commits] [mlir] [Tosa] : Fix integer overflow for computing intmax+1 in tosa.cast to linalg. (PR #112455)
Georgios Pinitas
llvmlistbot at llvm.org
Tue Oct 15 18:59:01 PDT 2024
================
@@ -563,7 +563,7 @@ static Value createLinalgBodyCalculationForElementwiseOp(
getElementTypeOrSelf(srcTy),
APInt::getSignedMaxValue(dstTy.getIntOrFloatBitWidth())
.getSExtValue() +
- 1));
+ 1.0));
----------------
GeorgeARM wrote:
nit: Suppose this now works due to the implicit conversion taking place.
Probably better to be more explicit in converting the above to double?
https://github.com/llvm/llvm-project/pull/112455
More information about the Mlir-commits
mailing list