This change is NFC. There were two issues when passing/reading upper bounds into/from FlatAffineConstraints that negate each other, so the bug was not apparent. However, it made debugging harder because some constraints in the FlatAffineConstraints were off by one when dumping all constraints.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM, accept conditioned on writing an extra unittest to lock in the new behavior without things cancelling out.
Comment Actions
I tried adding a unit test, but the effect of this change is localized to canonicalizeMinMaxOp and not visible outside of the function. Basically, this was not a problem of FlatAffineConstraints itself, but just incorrect API usage. To test this change, I would have to split canonicalizeMinMaxOp into separate functions, so that I can call them separately from a unit test. Splitting the function in such a way does not make sense conceptually though and would pollute the loop specialization API with functions that should never be called by users. I'll land this commit as is.