[MLIR] PresburgerSet subtraction: fix bug where the set `b` was not restored properly on return
When subtracting `b \ c`, when there are divisions in `c`, these division constraints get added to `b`. `b` must be restored to its original state when returning, but these added divisions constraints were not removed in one of the return paths. This patch fixes this and deduplicates the restoration logic by encapuslating it in a lambda `restoreState`. The patch also includes a regression test for the bug fix. Reviewed By: Groverkss Differential Revision: https://reviews.llvm.org/D115577
Loading
Please sign in to comment