SDBM: fix the order of variables in the stripe-induced inequalities
authorAlex Zinenko <zinenko@google.com>
Mon, 3 Jun 2019 17:00:16 +0000 (10:00 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Tue, 4 Jun 2019 02:26:29 +0000 (19:26 -0700)
commitf5e736c4481df78212a532f49b9ef02b2641da4c
tree1e2d0385dfd4295cebe9060d07c7121f9f3af4a5
parentc263ae91040c5e776a6a3d5ba2320dc2a3c46646
SDBM: fix the order of variables in the stripe-induced inequalities

The initial implementation of SDBM mistakenly swapped the order of variables in
the inequalities induced by a stripe equality: y = x # B actually implies
y - x <= 0 and x - y <= B - 1 rather than x - y <= 0 and y - x <= B - 1 as
implemented.  Textual comments in the test files were correct but did not
correspond to the emitted IR.  Round-tripping between SDBM and expression lists
was not affected because the wrong order was used in both directions of the
conversion.  Use the correct order.

PiperOrigin-RevId: 251252980
mlir/lib/SDBM/SDBM.cpp
mlir/test/SDBM/sdbm-api-test.cpp