isl_basic_set_sort_constraints: take into account all coefficients
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 7 Mar 2013 12:48:18 +0000 (13:48 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 8 Mar 2013 09:46:21 +0000 (10:46 +0100)
commit9e01482d12e48c160f18cdee75508abcf195788e
tree143c664a46effd0dc5294709476ea0cef9eb02d7
parent56798a073916c14d9671f11ccf3438b2762e09a1
isl_basic_set_sort_constraints: take into account all coefficients

The comparison function was mistakenly not taking into account
the coefficient of the last variable.  By ignoring this last
coefficient, the comparison could not guarantee the property required
by uset_gist.
Moreover, since constraints that only differ in this last coefficient
would compare equal to each other, the order of such constraints
could depend on the implementation of qsort, resulting in failing
test cases on Solaris 10.

We fix this problem by ignoring the constant term instead of
the last coefficient.  If two constraints only differ in the
constant term, then one of them should have been eliminated
already.

Reported-by: Amos <a.goo0h@gmail.com>
Tested-by: Marc Girod <marc.girod@gmail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
70 files changed:
isl_map.c
test_inputs/codegen/cloog/4-param.c
test_inputs/codegen/cloog/christian.c
test_inputs/codegen/cloog/classen.c
test_inputs/codegen/cloog/classen2.c
test_inputs/codegen/cloog/darte.c
test_inputs/codegen/cloog/dealII.c
test_inputs/codegen/cloog/gesced2.c
test_inputs/codegen/cloog/lineality-2-1-2.c
test_inputs/codegen/cloog/min-3-1.c
test_inputs/codegen/cloog/mod3.c
test_inputs/codegen/cloog/mxm-shared.c
test_inputs/codegen/cloog/nul_complex1.c
test_inputs/codegen/cloog/otl.c
test_inputs/codegen/cloog/pouchet.c
test_inputs/codegen/cloog/reservoir-bastoul3.c
test_inputs/codegen/cloog/reservoir-lim-lam1.c
test_inputs/codegen/cloog/reservoir-lim-lam3.c
test_inputs/codegen/cloog/reservoir-lim-lam4.c
test_inputs/codegen/cloog/reservoir-liu-zhuge1.c
test_inputs/codegen/cloog/reservoir-tang-xue1.c
test_inputs/codegen/cloog/stride3.c
test_inputs/codegen/cloog/stride4.c
test_inputs/codegen/cloog/thomasset.c
test_inputs/codegen/cloog/tiling.c
test_inputs/codegen/cloog/vasilache.c
test_inputs/codegen/cloog/vivien.c
test_inputs/codegen/cloog/vivien2.c
test_inputs/codegen/cloog/wavefront.c
test_inputs/codegen/dwt.c
test_inputs/codegen/hoist.c
test_inputs/codegen/omega/code_gen-0.c
test_inputs/codegen/omega/hpf-0.c
test_inputs/codegen/omega/if_then-4.c
test_inputs/codegen/omega/if_then-5.c
test_inputs/codegen/omega/iter5-0.c
test_inputs/codegen/omega/lefur00-0.c
test_inputs/codegen/omega/lefur01-0.c
test_inputs/codegen/omega/lefur01-1.c
test_inputs/codegen/omega/lefur03-0.c
test_inputs/codegen/omega/lefur04-0.c
test_inputs/codegen/omega/lift2-0.c
test_inputs/codegen/omega/lu-0.c
test_inputs/codegen/omega/lu-1.c
test_inputs/codegen/omega/lu-2.c
test_inputs/codegen/omega/lu-3.c
test_inputs/codegen/omega/m10-1.c
test_inputs/codegen/omega/m11-0.c
test_inputs/codegen/omega/p.delft-0.c
test_inputs/codegen/omega/p.delft2-0.c
test_inputs/codegen/omega/stride2-0.c
test_inputs/codegen/omega/stride3-0.c
test_inputs/codegen/omega/stride5-0.c
test_inputs/codegen/omega/syr2k-0.c
test_inputs/codegen/omega/syr2k-1.c
test_inputs/codegen/omega/syr2k-2.c
test_inputs/codegen/omega/syr2k-3.c
test_inputs/codegen/omega/ts1d-check-sblock-0.c
test_inputs/codegen/omega/ts1d-check0-0.c
test_inputs/codegen/omega/ts1d-mp-i_ts-m_b-0.c
test_inputs/codegen/omega/wak1-0.c
test_inputs/codegen/omega/wak1-1.c
test_inputs/codegen/omega/wak2-0.c
test_inputs/codegen/omega/wak2-1.c
test_inputs/codegen/omega/x-0.c
test_inputs/codegen/omega/x-1.c
test_inputs/codegen/separation_class.c
test_inputs/codegen/separation_class2.c
test_inputs/codegen/separation_class3.c
test_inputs/codegen/single_valued.c