Merge branch 'maint'
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 8 Mar 2013 10:14:01 +0000 (11:14 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 8 Mar 2013 10:14:01 +0000 (11:14 +0100)
1  2 
codegen_test.sh.in
isl_map.c
isl_test.c
test_inputs/codegen/omega/lefur04-0.c
test_inputs/codegen/omega/p.delft2-0.c

@@@ -10,10 -8,10 +10,12 @@@ for i in $srcdir/test_inputs/codegen/*.
                $srcdir/test_inputs/codegen/omega/*.in \
                $srcdir/test_inputs/codegen/pldi2012/*.in; do
        echo $i;
-       test=test-`basename $i .in`.c
-       ref=${i%.in}.c
+       base=`basename $i .in`
+       test=test-$base.c
+       dir=`dirname $i`
+       ref=$dir/$base.c
        (./isl_codegen$EXEEXT < $i > $test &&
 -       diff -uw $ref $test && rm $test) || exit
 +       diff -uw $ref $test && rm $test) || failed=1
  done
 +
 +test $failed -eq 0 || exit
diff --cc isl_map.c
Simple merge
diff --cc isl_test.c
Simple merge
@@@ -1,8 -1,8 +1,8 @@@
  for (int c0 = 0; c0 <= 3; c0 += 1)
-   for (int c1 = max(0, 2 * c0 - 3); c1 <= min(c0 + 1, 3); c1 += 1)
-     for (int c2 = c0; c2 <= min(min(3, 3 * c1 + 2), 2 * c0 - c1 + 1); c2 += 1)
+   for (int c1 = max(2 * c0 - 3, c0 / 2); c1 <= min(c0 + 1, 3); c1 += 1)
+     for (int c2 = c0; c2 <= min(min(3, 2 * c0 - c1 + 1), 3 * c1 + 2); c2 += 1)
        for (int c3 = max(max(max(c2 - (c2 + 2) / 3, c2 + floord(3 * c1 - c2 - 1, 6)), c1 - (-c1 + 3) / 3), c0 - (-c2 + 3) / 3); c3 <= min(c0 + c0 / 2 + 1, 3); c3 += 1)
-         for (int c5 = max(max(max(max(0, c1 - (-c1 + 3) / 3), 2 * c3 - 4), c3 - (c3 + 3) / 3), c2 - (c2 + 3) / 3); c5 <= min(min(-c2 + 2 * c3 - (c2 + 3) / 3 + 2, c1 + 1), c3); c5 += 1)
-           for (int c6 = max(max(max(max(max(250 * c3 + 1, 667 * c0 - 333 * c1 - (c0 + c1 + 3) / 3 - 332), -200 * c1 + 400 * c3 - 199), 333 * c1 + c1 / 3), 1000 * c0 - 500 * c5 - 501), 333 * c2 + (c2 + 1) / 3); c6 <= min(min(min(min(min(min(333 * c3 - (-c3 + 3) / 3 + 334, 1000), 333 * c2 - (-c2 + 3) / 3 + 333), 1000 * c0 - 500 * c5 + 997), 500 * c5 + 501), 500 * c0 + 499), -200 * c1 + 400 * c3 + 400); c6 += 1)
-             for (int c7 = max(max(max(max(c6, 500 * c1 + (c6 + 1) / 2), 1000 * c0 - c6), 500 * c5 + 2), 1000 * c3 - 2 * c6 + 2); c7 <= min(min(min(min(500 * c5 + 501, 2 * c6 + 1), 1000 * c3 - 2 * c6 + 1001), 1000 * c0 - c6 + 999), 500 * c1 + (c6 + 1) / 2 + 499); c7 += 1)
 -        for (int c5 = max(max(max(max(c1 - (c1 - 2 * c3 + 5) / 5, 0), c3 - (c3 + 3) / 3), 2 * c3 - 4), c2 - (c2 + 3) / 3); c5 <= min(min(c1 + 1, c3), -c2 + 2 * c3 - (c2 + 3) / 3 + 2); c5 += 1)
 -          for (int c6 = max(max(max(max(max(333 * c2 + (c2 + 1) / 3, -200 * c1 + 400 * c3 - 199), 1000 * c0 - 500 * c5 - 501), 333 * c1 + c1 / 3), 250 * c3 + 1), 667 * c0 - 333 * c1 - (c0 + c1 + 3) / 3 - 332); c6 <= min(min(min(min(min(min(500 * c0 + 499, 333 * c2 - (-c2 + 3) / 3 + 333), 333 * c3 - (-c3 + 3) / 3 + 334), -200 * c1 + 400 * c3 + 400), 500 * c5 + 501), 1000), 1000 * c0 - 500 * c5 + 997); c6 += 1)
++        for (int c5 = max(max(max(max(2 * c3 - 4, c2 - (c2 + 3) / 3), 0), c3 - (c3 + 3) / 3), c1 - (-c1 + 3) / 3); c5 <= min(min(c1 + 1, -c2 + 2 * c3 - (c2 + 3) / 3 + 2), c3); c5 += 1)
++          for (int c6 = max(max(max(max(max(667 * c0 - 333 * c1 - (c0 + c1 + 3) / 3 - 332, 333 * c2 + (c2 + 1) / 3), -200 * c1 + 400 * c3 - 199), 1000 * c0 - 500 * c5 - 501), 333 * c1 + c1 / 3), 250 * c3 + 1); c6 <= min(min(min(min(min(min(1000 * c0 - 500 * c5 + 997, 500 * c0 + 499), 333 * c2 - (-c2 + 3) / 3 + 333), 333 * c3 - (-c3 + 3) / 3 + 334), -200 * c1 + 400 * c3 + 400), 500 * c5 + 501), 1000); c6 += 1)
+             for (int c7 = max(max(max(max(c6, 500 * c5 + 2), 1000 * c3 - 2 * c6 + 2), 500 * c1 + (c6 + 1) / 2), 1000 * c0 - c6); c7 <= min(min(min(min(500 * c5 + 501, 2 * c6 + 1), 1000 * c0 - c6 + 999), 500 * c1 + (c6 + 1) / 2 + 499), 1000 * c3 - 2 * c6 + 1001); c7 += 1)
                s0(c0, c1, c2, c3, c2 / 3, c5, c6, c7);
@@@ -1,10 -1,10 +1,10 @@@
- if (P2 >= 0 && P2 <= 3 && P1 >= 0 && P1 <= 3)
 -if ((2 * floord(P2, 2) == P2 && 2 * floord(P1, 2) == P1 && P2 <= 3 && P2 >= 0 && P1 <= 3 && P1 >= 0) || (2 * floord(P2, 2) == P2 && 2 * floord(P1 - 1, 2) + 1 == P1 && P2 <= 3 && P2 >= 0 && P1 <= 3 && P1 >= 0) || (2 * floord(P2 - 1, 2) + 1 == P2 && 2 * floord(P1, 2) == P1 && P2 <= 3 && P2 >= 0 && P1 <= 3 && P1 >= 0) || (2 * floord(P2 - 1, 2) + 1 == P2 && 2 * floord(P1 - 1, 2) + 1 == P1 && P2 <= 3 && P2 >= 0 && P1 <= 3 && P1 >= 0))
++if (P2 <= 3 && P2 >= 0 && P1 <= 3 && P1 >= 0)
    for (int c0 = P1 - 1; c0 <= 3; c0 += 1)
 -    if ((2 * floord(c0, 2) == c0 && P2 % 2 == 0 && 2 * floord(P1 - 1, 2) + 1 == P1) || (2 * floord(c0, 2) == c0 && 2 * floord(P2 - 1, 2) + 1 == P2 && 2 * floord(P1 - 1, 2) + 1 == P1) || (2 * floord(c0 - 1, 2) + 1 == c0 && P2 % 2 == 0 && P1 % 2 == 0) || (2 * floord(c0 - 1, 2) + 1 == c0 && 2 * floord(P2 - 1, 2) + 1 == P2 && P1 % 2 == 0))
 +    if (P1 + 2 * floord(-P1 + c0 - 1, 2) + 1 == c0)
        for (int c2 = 0; c2 <= -((P1 + 4) / 4) + 8; c2 += 1)
 -        if ((-2 * ((-P2 + 4) / 4) + 2 * (P2 / 4) + 2 == P2 && 2 * floord(P2 - 1, 2) + 2 == P2 && P2 <= 6 && 18 * floord(9 * P1 + 17 * c0 + 14 * c2 + 3, 18) + 1 >= 9 * P1 + 17 * c0 + 14 * c2) || (2 * floord(P2 - 1, 2) + 1 == P2 && 18 * floord(9 * P1 + 17 * c0 + 14 * c2 + 3, 18) + 1 >= 9 * P1 + 17 * c0 + 14 * c2 && P2 + 1 >= 0 && (-P2 + 4) % 4 >= 1))
 +        if ((9 * P1 + c0 + 4 * c2 + 1) % 18 <= 4)
            for (int c3 = 0; c3 <= -((P2 + 4) / 4) + 8; c3 += 1)
 -            if ((5 * P2 + 2 * c3) % 9 <= 3 && 9 * ((4 * P2 + 3) / 9 / 2) + 7 >= 2 * P2 && 2 * P2 + 1 >= 9 * ((4 * P2 + 3) / 9 / 2))
 +            if ((5 * P2 + 2 * c3) % 9 <= 3)
                if (c0 + 1 == P1 && (5 * P1 + 2 * c2) % 9 <= 2 && P1 >= 1) {
                  s0(P1 - 1, P2, c2, c3, ((5 * P1 + 2 * c2) % 9) + 1, (-4 * P2 + 2 * c3 + 9) % 9);
                } else if (c2 % 4 == 0 && c0 == 3 && P1 == 0)