| Issue |
60919
|
| Summary |
[MLIR] Potentially incorrect check in PresburgerSet.cpp subtract
|
| Labels |
mlir:presburger
|
| Assignees |
|
| Reporter |
bondhugula
|
The check at this line looks unsafe/incorrect:
https://github.com/llvm/llvm-project/blob/b0d1f87b5943b695be44e7ae186a28e263143a6b/mlir/lib/Analysis/Presburger/PresburgerRelation.cpp#L313
Note that `b`'s local vars could be reduced post `b.mergeLocalVars` (since duplicates are also eliminated) at https://github.com/llvm/llvm-project/blob/b0d1f87b5943b695be44e7ae186a28e263143a6b/mlir/lib/Analysis/Presburger/PresburgerRelation.cpp#L250
As a result, the difference at L313 could just lead to an overflow. An `assert` is needed as well.
CC: @Superty @Groverkss
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs