[Mlir-commits] [llvm] [mlir] Do not trigger UB during AffineExpr parsing. (PR #96896)
Adrian Kuegel
llvmlistbot at llvm.org
Thu Jun 27 04:16:28 PDT 2024
================
@@ -905,10 +921,16 @@ static AffineExpr simplifyCeilDiv(AffineExpr lhs, AffineExpr rhs) {
if (!rhsConst || rhsConst.getValue() < 1)
return nullptr;
- if (lhsConst)
+ if (lhsConst) {
+ // divideCeilSigned can only overflow in this case:
+ if (lhsConst.getValue() == std::numeric_limits<int64_t>::min() &&
----------------
akuegel wrote:
already covered above in line 921
https://github.com/llvm/llvm-project/pull/96896
More information about the Mlir-commits
mailing list