From 89023c02464922efb0b7332d5d2c4dc949b60739 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 28 Sep 2012 19:36:50 +0200 Subject: [PATCH] add extra AST generation test case from CLooG The test case was not added before because the output had not been tested yet. Signed-off-by: Sven Verdoolaege --- test_inputs/codegen/cloog/otl.c | 7 +++++++ test_inputs/codegen/cloog/otl.in | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 test_inputs/codegen/cloog/otl.c create mode 100644 test_inputs/codegen/cloog/otl.in diff --git a/test_inputs/codegen/cloog/otl.c b/test_inputs/codegen/cloog/otl.c new file mode 100644 index 0000000..202f37b --- /dev/null +++ b/test_inputs/codegen/cloog/otl.c @@ -0,0 +1,7 @@ +if (M >= 3 && N >= 4) + for (int c0 = 1; c0 <= (2 * M + 2 * N - 2) / 5 - 1; c0 += 1) + for (int c1 = max(c0 - c0 / 2, c0 - (M + 2) / 5); c1 <= min(min((2 * N + 5 * c0 + 1) / 10, c0), (M + 2 * N) / 5 - 1); c1 += 1) + for (int c2 = max(max(max(max(c0 - (N + 5 * c0 + 2) / 10, c1 - (N + 1) / 5), c0 - c1 - 1), 0), c0 - (M + N - 1) / 5); c2 <= min(min(min(c0 - c1 + (N - 1) / 5 + 1, (N + 5 * c0 + 3) / 10), c1), (M + N - 2) / 5); c2 += 1) + for (int c3 = max(max(max(c1 + c2 - (N - 2) / 5 - 1, 2 * c2 - (N + 2) / 5), 2 * c1 - 2 * N / 5), c0); c3 <= min(min(min(min(min(c0 + 1, c1 + c2 + 1), c2 + (M + N) / 5), (2 * M + 2 * N - 1) / 5 - 1), c1 + (M - 2) / 5 + 1), 2 * c2 + (N - 2) / 5 + 1); c3 += 1) + for (int c4 = max(max(max(max(c1, c0 - c2), c3 - (M + 2) / 5), c0 - (M + 1) / 5), c3 - c3 / 2); c4 <= min(min(min(min(min(min(min(c0 - c2 + N / 5 + 1, -c2 + c3 + (N - 1) / 5 + 1), (2 * N + 5 * c0 + 3) / 10), (M + 2 * N + 1) / 5 - 1), (2 * N + 5 * c3 + 2) / 10), c2 + (N + 2) / 5), c1 + 1), c0); c4 += 1) + S1(c0, c1, c2, c3, c4, c2); diff --git a/test_inputs/codegen/cloog/otl.in b/test_inputs/codegen/cloog/otl.in new file mode 100644 index 0000000..a6ad5d2 --- /dev/null +++ b/test_inputs/codegen/cloog/otl.in @@ -0,0 +1,3 @@ +[M, N] -> { S1[i0, i1, i2, i3, i4, i2] -> [i0, i1, i2, i3, i4, i2] : 5i0 <= -7 + 2M + 2N and i4 >= i0 - i2 and 10i2 >= -2 - N + 5i0 and i2 >= -1 + i0 - i1 and 2i4 >= i0 and i0 >= 1 and i1 >= 1 and 2i1 >= i0 and i2 >= 0 and 5i2 >= 1 - M - N + 5i0 and 5i4 >= -1 - M + 5i0 and i3 >= i0 and 5i1 >= -2 - M + 5i0 and i3 >= 1 and 5i3 >= -3 - N + 5i1 + 5i2 and 5i2 <= 4 + N + 5i0 - 5i1 and i4 >= 1 and i2 <= i0 and 5i3 >= -2N + 10i1 and 5i1 <= -5 + M + 2N and 10i1 <= 1 + 2N + 5i0 and 5i2 >= -1 - N + 5i1 and i4 >= i1 and i3 >= i1 and i2 <= i1 and i1 <= i0 and 5i4 <= 4 + N - 5i2 + 5i3 and 5i4 <= 5 + N + 5i0 - 5i2 and 5i3 >= -2 - N + 10i2 and 5i2 <= -2 + M + N and 10i2 <= 3 + N + 5i0 and N >= 4 and i4 >= i2 and i3 >= i2 and M >= 3 and i4 <= i0 and 5i3 <= -6 + 2M + 2N and i4 >= -1 - i2 + i3 and 5i3 <= 3 + N + 10i2 and i3 <= 1 + i1 + i2 and i4 <= 1 + i1 and 2i4 >= i3 and 5i4 <= 2 + N + 5i2 and i3 <= 1 + 2i1 and i4 <= i3 and 5i3 <= M + N + 5i2 and 5i4 >= -2 - M + 5i3 and 10i4 <= 3 + 2N + 5i0 and i3 <= 1 + i0 and 5i3 <= 3 + M + 5i1 and 5i4 <= -4 + M + 2N and 10i4 <= 2 + 2N + 5i3 } +[M, N] -> { : M >= 1 and N >= 1 } +[M, N] -> { [i, j, k, l, m, n] -> separate[o0] } -- 2.7.4