[PATCH] D80860: Exact integer emptiness checks for FlatAffineConstraints

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 2 21:27:05 PST 2022


mehdi_amini added inline comments.
Herald added subscribers: sdasgup3, Groverkss, wenzhicui, wrengr, Chia-hungDuan, dcaballe, cota, teijeong, rdzhabarov, tatianashp, bollu.


================
Comment at: mlir/lib/Analysis/Presburger/Simplex.cpp:131
+  for (unsigned col = 0; col < nCol; ++col)
+    tableau(row, col) /= gcd;
+}
----------------
What guarantees that `gcd` can't be 0 and produce an invalid division here?
Should we guard this loop?

(flagged by Coverity)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80860/new/

https://reviews.llvm.org/D80860



More information about the llvm-commits mailing list