From 31e33444ef584374f43cf00bf1ca69420440cbec Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 20 Apr 2017 13:36:04 +0200 Subject: [PATCH] isl_hash_{space,space_domain}: extract out shared parameter hashing isl_space_get_hash takes into account both the parameters and the tuples. In some cases, it can by convenient to be able to ignore the parameters. A new function isl_space_get_tuple_hash will be introduced for this purpose, which will (conceptually) share the handling of the tuples with isl_space_get_hash. In order to also be able to share the code for handling tuples, it first needs to be separated from the handling of parameters. This separation is performed by this commit, which also removes some code duplication. Since the handling or parameters and tuples was intermixed, the separation results in changes in the hash values and subsequently in changes in the AST generation output. Signed-off-by: Sven Verdoolaege --- isl_space.c | 32 +++++---- test_inputs/codegen/cloog/classen.c | 24 +++---- test_inputs/codegen/cloog/dealII.c | 4 +- test_inputs/codegen/cloog/dot2.c | 4 +- test_inputs/codegen/cloog/gauss.c | 4 +- test_inputs/codegen/cloog/gesced.c | 4 +- test_inputs/codegen/cloog/gesced2.c | 6 +- test_inputs/codegen/cloog/lineality-2-1-2.c | 6 +- test_inputs/codegen/cloog/mode.c | 4 +- test_inputs/codegen/cloog/test.c | 6 +- test_inputs/codegen/cloog/vivien.c | 8 +-- test_inputs/codegen/cloog/vivien2.c | 10 +-- test_inputs/codegen/cloog/yosr2.c | 6 +- test_inputs/codegen/correlation.c | 100 +++++++++++++--------------- test_inputs/codegen/empty.c | 2 +- test_inputs/codegen/omega/if_then-1.c | 2 +- test_inputs/codegen/omega/if_then-2.c | 2 +- test_inputs/codegen/omega/if_then-3.c | 2 +- test_inputs/codegen/omega/iter9-0.c | 6 +- test_inputs/codegen/omega/m12-1.c | 2 +- test_inputs/codegen/omega/wak1-0.c | 54 +++++++-------- test_inputs/codegen/omega/wak1-1.c | 34 +++++----- test_inputs/codegen/omega/wak2-1.c | 8 +-- test_inputs/codegen/pldi2012/figure7_b.c | 2 +- test_inputs/codegen/pldi2012/figure7_c.c | 2 +- test_inputs/codegen/pldi2012/figure7_d.c | 2 +- test_inputs/codegen/shift2.c | 100 ++++++++++++++++------------ 27 files changed, 223 insertions(+), 213 deletions(-) rewrite test_inputs/codegen/correlation.c (71%) rewrite test_inputs/codegen/omega/wak1-0.c (82%) rewrite test_inputs/codegen/shift2.c (87%) diff --git a/isl_space.c b/isl_space.c index e063dba6..f1469d4a 100644 --- a/isl_space.c +++ b/isl_space.c @@ -1931,10 +1931,9 @@ isl_bool isl_space_is_range(__isl_keep isl_space *space1, return isl_space_is_range_internal(space1, space2); } -/* Update "hash" by hashing in "space". - * Changes in this function should be reflected in isl_hash_space_domain. +/* Update "hash" by hashing in the parameters of "space". */ -static uint32_t isl_hash_space(uint32_t hash, __isl_keep isl_space *space) +static uint32_t isl_hash_params(uint32_t hash, __isl_keep isl_space *space) { int i; isl_id *id; @@ -1943,14 +1942,29 @@ static uint32_t isl_hash_space(uint32_t hash, __isl_keep isl_space *space) return hash; isl_hash_byte(hash, space->nparam % 256); - isl_hash_byte(hash, space->n_in % 256); - isl_hash_byte(hash, space->n_out % 256); for (i = 0; i < space->nparam; ++i) { id = get_id(space, isl_dim_param, i); hash = isl_hash_id(hash, id); } + return hash; +} + +/* Update "hash" by hashing in "space". + * Changes in this function should be reflected in isl_hash_space_domain. + */ +static uint32_t isl_hash_space(uint32_t hash, __isl_keep isl_space *space) +{ + isl_id *id; + + if (!space) + return hash; + + hash = isl_hash_params(hash, space); + isl_hash_byte(hash, space->n_in % 256); + isl_hash_byte(hash, space->n_out % 256); + id = tuple_id(space, isl_dim_in); hash = isl_hash_id(hash, id); id = tuple_id(space, isl_dim_out); @@ -1969,21 +1983,15 @@ static uint32_t isl_hash_space(uint32_t hash, __isl_keep isl_space *space) static uint32_t isl_hash_space_domain(uint32_t hash, __isl_keep isl_space *space) { - int i; isl_id *id; if (!space) return hash; - isl_hash_byte(hash, space->nparam % 256); + hash = isl_hash_params(hash, space); isl_hash_byte(hash, 0); isl_hash_byte(hash, space->n_in % 256); - for (i = 0; i < space->nparam; ++i) { - id = get_id(space, isl_dim_param, i); - hash = isl_hash_id(hash, id); - } - hash = isl_hash_id(hash, &isl_id_none); id = tuple_id(space, isl_dim_in); hash = isl_hash_id(hash, id); diff --git a/test_inputs/codegen/cloog/classen.c b/test_inputs/codegen/cloog/classen.c index d51254c0..9a766484 100644 --- a/test_inputs/codegen/cloog/classen.c +++ b/test_inputs/codegen/cloog/classen.c @@ -4,9 +4,9 @@ if (m >= 1) { S8(0, 1); } else { S1(0, 1, 1, 1); + S2(0, 1, 1, 1, 1, 1, 2, 1); S4(0, 1, 2, 2, 1, 1, 2, 2); S3(0, 1, 1, 2, 1, 1, 1, 2); - S2(0, 1, 1, 1, 1, 1, 2, 1); S8(0, 1); } for (int c0 = 1; c0 < 2 * m - 3; c0 += 1) { @@ -17,9 +17,9 @@ if (m >= 1) { } else if (m >= c0 + 2) { S5(c0 - 1, 1, c0, 1, c0, 1, c0 + 1, 1); S1(c0, 1, c0 + 1, 1); - S4(c0, 1, c0 + 2, 2, c0 + 1, 1, c0 + 2, 2); S2(c0, 1, c0 + 1, 1, c0 + 1, 1, c0 + 2, 1); S3(c0, 1, c0 + 1, 2, c0 + 1, 1, c0 + 1, 2); + S4(c0, 1, c0 + 2, 2, c0 + 1, 1, c0 + 2, 2); } else { S5(c0 - 1, -m + c0 + 2, c0, -m + c0 + 2, m - 1, -m + c0 + 2, m, -m + c0 + 2); S6(c0 - 1, -m + c0 + 1, c0, -m + c0 + 2, m, -m + c0 + 1, m, -m + c0 + 2); @@ -31,28 +31,28 @@ if (m >= 1) { S6(c0 - 1, c1 - 1, c0, c1, c0 - c1 + 2, c1 - 1, c0 - c1 + 2, c1); S7(c0 - 1, c1 - 1, c0 + 1, c1, c0 - c1 + 2, c1 - 1, c0 - c1 + 3, c1); S1(c0, c1, c0 - c1 + 2, c1); - S4(c0, c1, c0 + 2, c1 + 1, c0 - c1 + 2, c1, c0 - c1 + 3, c1 + 1); S2(c0, c1, c0 + 1, c1, c0 - c1 + 2, c1, c0 - c1 + 3, c1); S3(c0, c1, c0 + 1, c1 + 1, c0 - c1 + 2, c1, c0 - c1 + 2, c1 + 1); + S4(c0, c1, c0 + 2, c1 + 1, c0 - c1 + 2, c1, c0 - c1 + 3, c1 + 1); } if (c0 + 1 == m) { S7(m - 2, m - 1, m, m, 1, m - 1, 2, m); S6(m - 2, m - 1, m - 1, m, 1, m - 1, 1, m); S1(m - 1, m, 1, m); S2(m - 1, m, m, m, 1, m, 2, m); - } else if (m >= c0 + 2) { + } else if (c0 >= m) { + S5(c0 - 1, m, c0, m, -m + c0 + 1, m, -m + c0 + 2, m); + S6(c0 - 1, m - 1, c0, m, -m + c0 + 2, m - 1, -m + c0 + 2, m); + S7(c0 - 1, m - 1, c0 + 1, m, -m + c0 + 2, m - 1, -m + c0 + 3, m); + S1(c0, m, -m + c0 + 2, m); + S2(c0, m, c0 + 1, m, -m + c0 + 2, m, -m + c0 + 3, m); + } else { S7(c0 - 1, c0, c0 + 1, c0 + 1, 1, c0, 2, c0 + 1); S6(c0 - 1, c0, c0, c0 + 1, 1, c0, 1, c0 + 1); S1(c0, c0 + 1, 1, c0 + 1); - S4(c0, c0 + 1, c0 + 2, c0 + 2, 1, c0 + 1, 2, c0 + 2); S2(c0, c0 + 1, c0 + 1, c0 + 1, 1, c0 + 1, 2, c0 + 1); S3(c0, c0 + 1, c0 + 1, c0 + 2, 1, c0 + 1, 1, c0 + 2); - } else { - S5(c0 - 1, m, c0, m, -m + c0 + 1, m, -m + c0 + 2, m); - S7(c0 - 1, m - 1, c0 + 1, m, -m + c0 + 2, m - 1, -m + c0 + 3, m); - S6(c0 - 1, m - 1, c0, m, -m + c0 + 2, m - 1, -m + c0 + 2, m); - S1(c0, m, -m + c0 + 2, m); - S2(c0, m, c0 + 1, m, -m + c0 + 2, m, -m + c0 + 3, m); + S4(c0, c0 + 1, c0 + 2, c0 + 2, 1, c0 + 1, 2, c0 + 2); } for (int c2 = max(1, -m + c0 + 2); c2 <= min(m, c0 + 1); c2 += 1) S8(c0, c2); @@ -64,8 +64,8 @@ if (m >= 1) { S1(2 * m - 3, m - 1, m, m - 1); S3(2 * m - 3, m - 1, 2 * m - 2, m, m, m - 1, m, m); S5(2 * m - 4, m, 2 * m - 3, m, m - 2, m, m - 1, m); - S7(2 * m - 4, m - 1, 2 * m - 2, m, m - 1, m - 1, m, m); S6(2 * m - 4, m - 1, 2 * m - 3, m, m - 1, m - 1, m - 1, m); + S7(2 * m - 4, m - 1, 2 * m - 2, m, m - 1, m - 1, m, m); S1(2 * m - 3, m, m - 1, m); } else { S5(0, 1, 1, 1, 1, 1, 2, 1); diff --git a/test_inputs/codegen/cloog/dealII.c b/test_inputs/codegen/cloog/dealII.c index 99ac53ee..8219178e 100644 --- a/test_inputs/codegen/cloog/dealII.c +++ b/test_inputs/codegen/cloog/dealII.c @@ -3,6 +3,8 @@ S1(c0); S2(c0); } + for (int c0 = T_2; c0 <= min(T_67 - 1, T_66); c0 += 1) + S2(c0); for (int c0 = max(0, T_66 + 1); c0 < min(T_2, T_67); c0 += 1) S1(c0); for (int c0 = T_67; c0 <= min(T_2 - 1, T_66); c0 += 1) { @@ -11,8 +13,6 @@ } for (int c0 = max(T_67, T_66 + 1); c0 < T_2; c0 += 1) S1(c0); - for (int c0 = T_2; c0 <= min(T_67 - 1, T_66); c0 += 1) - S2(c0); if (T_2 == 0 && T_67 == 0) S1(0); } diff --git a/test_inputs/codegen/cloog/dot2.c b/test_inputs/codegen/cloog/dot2.c index a1b10692..1990d269 100644 --- a/test_inputs/codegen/cloog/dot2.c +++ b/test_inputs/codegen/cloog/dot2.c @@ -4,9 +4,9 @@ for (int c1 = 1; c1 <= M; c1 += 1) S2(c0, c1); } - for (int c0 = N + 1; c0 <= M; c0 += 1) - S1(c0); for (int c0 = M + 1; c0 <= N; c0 += 1) for (int c1 = 1; c1 <= M; c1 += 1) S2(c0, c1); + for (int c0 = N + 1; c0 <= M; c0 += 1) + S1(c0); } diff --git a/test_inputs/codegen/cloog/gauss.c b/test_inputs/codegen/cloog/gauss.c index 4bbe42cb..13a8e137 100644 --- a/test_inputs/codegen/cloog/gauss.c +++ b/test_inputs/codegen/cloog/gauss.c @@ -1,7 +1,7 @@ for (int c0 = 1; c0 < M; c0 += 1) for (int c1 = c0 + 1; c1 <= M; c1 += 1) { - for (int c3 = 1; c3 < c0; c3 += 1) - S1(c0, c3, c1); for (int c3 = c0 + 1; c3 <= M; c3 += 1) S2(c0, c3, c1); + for (int c3 = 1; c3 < c0; c3 += 1) + S1(c0, c3, c1); } diff --git a/test_inputs/codegen/cloog/gesced.c b/test_inputs/codegen/cloog/gesced.c index a36715ca..40cdad98 100644 --- a/test_inputs/codegen/cloog/gesced.c +++ b/test_inputs/codegen/cloog/gesced.c @@ -6,9 +6,9 @@ S2(c1, -N + c0); for (int c0 = 2 * N + 1; c0 <= M + N; c0 += 1) { for (int c1 = 1; c1 <= N; c1 += 1) - S3(c1, -2 * N + c0); - for (int c1 = 1; c1 <= N; c1 += 1) S2(c1, -N + c0); + for (int c1 = 1; c1 <= N; c1 += 1) + S3(c1, -2 * N + c0); } for (int c0 = M + N + 1; c0 <= M + 2 * N; c0 += 1) for (int c1 = 1; c1 <= N; c1 += 1) diff --git a/test_inputs/codegen/cloog/gesced2.c b/test_inputs/codegen/cloog/gesced2.c index 0baf706e..b8e14ed8 100644 --- a/test_inputs/codegen/cloog/gesced2.c +++ b/test_inputs/codegen/cloog/gesced2.c @@ -6,13 +6,13 @@ for (int c1 = -c0 + 1; c1 <= 4; c1 += 1) S2(c0 + c1, c0); for (int c1 = 5; c1 <= min(M - 10, M - c0); c1 += 1) { - S1(c0, c1); S2(c0 + c1, c0); - } - for (int c1 = M - c0 + 1; c1 < M - 9; c1 += 1) S1(c0, c1); + } for (int c1 = M - 9; c1 <= M - c0; c1 += 1) S2(c0 + c1, c0); + for (int c1 = M - c0 + 1; c1 < M - 9; c1 += 1) + S1(c0, c1); } for (int c0 = M - 9; c0 <= M; c0 += 1) for (int c1 = 5; c1 < M - 9; c1 += 1) diff --git a/test_inputs/codegen/cloog/lineality-2-1-2.c b/test_inputs/codegen/cloog/lineality-2-1-2.c index 97a4b045..23f50d24 100644 --- a/test_inputs/codegen/cloog/lineality-2-1-2.c +++ b/test_inputs/codegen/cloog/lineality-2-1-2.c @@ -1,12 +1,12 @@ for (int c0 = 1; c0 <= M; c0 += 1) { for (int c1 = 1; c1 <= min(M, c0 + 1); c1 += 1) S1(c0, c1); - if (M >= c0 + 2) { + if (c0 + 1 >= M) { + S2(c0, c0 + 2); + } else { S1(c0, c0 + 2); S2(c0, c0 + 2); } for (int c1 = c0 + 3; c1 <= M; c1 += 1) S1(c0, c1); - if (c0 + 1 >= M) - S2(c0, c0 + 2); } diff --git a/test_inputs/codegen/cloog/mode.c b/test_inputs/codegen/cloog/mode.c index bcfd3183..5596b26b 100644 --- a/test_inputs/codegen/cloog/mode.c +++ b/test_inputs/codegen/cloog/mode.c @@ -3,8 +3,8 @@ for (int c0 = 0; c0 <= M; c0 += 1) { S1(c0, c1); S2(c0, c1); } - for (int c1 = max(0, N + 1); c1 <= c0; c1 += 1) - S1(c0, c1); for (int c1 = c0 + 1; c1 <= N; c1 += 1) S2(c0, c1); + for (int c1 = max(0, N + 1); c1 <= c0; c1 += 1) + S1(c0, c1); } diff --git a/test_inputs/codegen/cloog/test.c b/test_inputs/codegen/cloog/test.c index 84c84931..f0544abd 100644 --- a/test_inputs/codegen/cloog/test.c +++ b/test_inputs/codegen/cloog/test.c @@ -5,13 +5,13 @@ for (int c0 = 3; c0 <= N; c0 += 1) { for (int c1 = 1; c1 <= min(M, c0 - 1); c1 += 1) S1(c0, c1); - if (M >= c0) { + if (c0 >= M + 1) { + S2(c0, c0); + } else { S1(c0, c0); S2(c0, c0); } for (int c1 = c0 + 1; c1 <= M; c1 += 1) S1(c0, c1); - if (c0 >= M + 1) - S2(c0, c0); } } diff --git a/test_inputs/codegen/cloog/vivien.c b/test_inputs/codegen/cloog/vivien.c index 030a88ad..3976babf 100644 --- a/test_inputs/codegen/cloog/vivien.c +++ b/test_inputs/codegen/cloog/vivien.c @@ -15,8 +15,8 @@ } } for (int c1 = -c0 + c0 / 2 + 3; c1 <= min(-1, n - c0); c1 += 1) { - S4(-c1, c0 + c1); S6(-c1 + 2, c0 + c1 - 2); + S4(-c1, c0 + c1); for (int c2 = 1; c2 <= -c1; c2 += 1) S5(-c1 + 1, c0 + c1 - 1, c2); } @@ -26,8 +26,8 @@ S5(-n + c0, n, c2); } if (n >= 3 && c0 == n + 2) { - S6(2, n); S1(n + 1); + S6(2, n); } else { if (c0 >= n + 3 && 2 * n >= c0 + 1) S6(-n + c0, n); @@ -37,8 +37,8 @@ if (n + 1 >= c0 && c0 <= 4) { S1(c0 - 1); } else if (c0 >= 5 && n + 1 >= c0) { - S6(2, c0 - 2); S1(c0 - 1); + S6(2, c0 - 2); } if (n + 1 >= c0) S6(1, c0 - 1); @@ -68,8 +68,8 @@ S5(c0 - c0 / 2 - 1, c0 / 2 + 1, c2); } for (int c1 = -c0 + c0 / 2 + 3; c1 <= n - c0; c1 += 1) { - S4(-c1, c0 + c1); S6(-c1 + 2, c0 + c1 - 2); + S4(-c1, c0 + c1); for (int c2 = 1; c2 <= -c1; c2 += 1) S5(-c1 + 1, c0 + c1 - 1, c2); } diff --git a/test_inputs/codegen/cloog/vivien2.c b/test_inputs/codegen/cloog/vivien2.c index d30183e9..f13c6d74 100644 --- a/test_inputs/codegen/cloog/vivien2.c +++ b/test_inputs/codegen/cloog/vivien2.c @@ -10,8 +10,8 @@ S5(c0 - c0 / 2 - 1, c0 / 2 + 1, c2); } for (int c1 = -c0 + c0 / 2 + 3; c1 <= min(-1, n - c0); c1 += 1) { - S4(-c1, c0 + c1); S6(-c1 + 2, c0 + c1 - 2); + S4(-c1, c0 + c1); for (int c2 = 1; c2 <= -c1; c2 += 1) S5(-c1 + 1, c0 + c1 - 1, c2); } @@ -20,8 +20,8 @@ for (int c2 = 1; c2 < -n + c0; c2 += 1) S5(-n + c0, n, c2); if (c0 == n + 2) { - S6(2, n); S1(n + 1); + S6(2, n); } } else if (c0 + 2 >= 2 * n) { for (int c2 = 1; c2 < -n + c0; c2 += 1) @@ -31,10 +31,10 @@ S6(-n + c0, n); S1(c0 - 1); } else { - if (c0 <= 4) { + if (c0 >= 5 && n + 1 >= c0) { S1(c0 - 1); - } else if (n + 1 >= c0) { S6(2, c0 - 2); + } else if (c0 <= 4) { S1(c0 - 1); } if (n + 1 >= c0) @@ -60,8 +60,8 @@ S5(c0 - c0 / 2 - 1, c0 / 2 + 1, c2); } for (int c1 = -c0 + c0 / 2 + 3; c1 <= n - c0; c1 += 1) { - S4(-c1, c0 + c1); S6(-c1 + 2, c0 + c1 - 2); + S4(-c1, c0 + c1); for (int c2 = 1; c2 <= -c1; c2 += 1) S5(-c1 + 1, c0 + c1 - 1, c2); } diff --git a/test_inputs/codegen/cloog/yosr2.c b/test_inputs/codegen/cloog/yosr2.c index a52909cc..3c2cbc8e 100644 --- a/test_inputs/codegen/cloog/yosr2.c +++ b/test_inputs/codegen/cloog/yosr2.c @@ -2,12 +2,12 @@ for (int c1 = 1; c1 <= M; c1 += 1) S2(c1); for (int c0 = 2; c0 <= M; c0 += 1) { - for (int c2 = c0 + 1; c2 <= M; c2 += 1) - for (int c3 = 1; c3 < c0; c3 += 1) - S3(c0, c2, c3); for (int c1 = 1; c1 < c0; c1 += 1) S4(c1, c0); for (int c2 = 1; c2 < c0; c2 += 1) S1(c0, c2); + for (int c2 = c0 + 1; c2 <= M; c2 += 1) + for (int c3 = 1; c3 < c0; c3 += 1) + S3(c0, c2, c3); } } diff --git a/test_inputs/codegen/correlation.c b/test_inputs/codegen/correlation.c dissimilarity index 71% index f821db6c..e771b436 100644 --- a/test_inputs/codegen/correlation.c +++ b/test_inputs/codegen/correlation.c @@ -1,55 +1,45 @@ -for (int c0 = 0; c0 < m; c0 += 32) - for (int c1 = (n >= 32 && m >= c0 + 2) || (m == 1 && c0 == 0) ? 0 : 32 * n - 32 * floord(31 * n + 31, 32); c1 <= ((n <= -1 && c0 == 0) || (m == 1 && n >= 0 && c0 == 0) ? max(0, n - 1) : n); c1 += 32) - for (int c2 = c0; c2 <= (m >= 2 && c0 + 31 >= m && n >= c1 && c1 + 31 >= n ? 2 * m - 3 : (m >= 2 * c0 + 63 && c1 <= -32 && n >= c1 && c1 + 31 >= n) || (m >= c0 + 32 && 2 * c0 + 62 >= m && n >= c1 && c1 + 31 >= n) || (n >= 0 && c0 >= 32 && m >= 2 * c0 + 63 && c1 == n) || (m >= 63 && n >= 32 && c0 == 0 && c1 == n) ? 2 * c0 + 61 : m - 1); c2 += 32) { - if (m >= 2) { - if (n <= 0 && c0 == 0 && c1 == 0) - for (int c5 = 0; c5 <= min(31, m - c2 - 1); c5 += 1) - S_14(c2 + c5); - if (n >= 0 && c1 == n) { - for (int c3 = max(0, (c2 / 2) - c0 + 1); c3 <= min(31, m - c0 - 2); c3 += 1) - for (int c5 = max(0, c0 - c2 + c3); c5 <= min(31, 2 * c0 - c2 + 2 * c3 - 1); c5 += 1) - S_29(-c0 + c2 - c3 + c5, c0 + c3); - } else if (n >= c1 + 1 && c1 >= 0 && c1 + 31 >= n && c2 >= m) { - for (int c3 = max(0, (c2 / 2) - c0 + 1); c3 <= min(31, m - c0 - 2); c3 += 1) - for (int c5 = 0; c5 <= min(31, 2 * c0 - c2 + 2 * c3 - 1); c5 += 1) - S_29(-c0 + c2 - c3 + c5, c0 + c3); - } else if (c1 <= -32 && n >= c1 && c1 + 31 >= n) { - for (int c3 = max(0, (c2 / 2) - c0 + 1); c3 <= min(31, m - c0 - 2); c3 += 1) - for (int c5 = max(0, c0 - c2 + c3); c5 <= min(31, 2 * c0 - c2 + 2 * c3 - 1); c5 += 1) - S_29(-c0 + c2 - c3 + c5, c0 + c3); - } else if (n >= c1 + 1 && c1 >= 0 && m >= c2 + 1) { - for (int c3 = 0; c3 <= min(min(31, m - c0 - 2), -c0 + c2 + 30); c3 += 1) { - for (int c4 = 0; c4 <= min(31, n - c1 - 1); c4 += 1) { - if (c0 == 0 && c2 == 0 && c3 == 0) { - if (c1 == 0 && c4 == 0) - S_14(0); - S_19(c1 + c4, 0); - } - for (int c5 = max(0, c0 - c2 + c3 + 1); c5 <= min(31, m - c2 - 1); c5 += 1) { - if (c0 == 0 && c1 == 0 && c3 == 0 && c4 == 0) - S_14(c2 + c5); - if (c0 == 0 && c3 == 0) - S_19(c1 + c4, c2 + c5); - S_27(c0 + c3, c2 + c5, c1 + c4); - } - } - if (c1 + 31 >= n) - for (int c5 = max(0, c0 - c2 + c3); c5 <= min(31, 2 * c0 - c2 + 2 * c3 - 1); c5 += 1) - S_29(-c0 + c2 - c3 + c5, c0 + c3); - } - } - if (c0 + 32 >= m && n >= c1 && c1 + 31 >= n) { - for (int c5 = max(0, m - c2 - 1); c5 <= min(31, 2 * m - c2 - 3); c5 += 1) - S_29(-m + c2 + c5 + 1, m - 1); - } else if (m >= c0 + 33 && n >= c1 + 1 && c1 >= 0 && c1 + 31 >= n && c2 == c0) { - S_29(0, c0 + 31); - } - } else if (c1 >= 32 && c2 == 0) { - for (int c4 = 0; c4 <= min(31, n - c1 - 1); c4 += 1) - S_19(c1 + c4, 0); - } else if (c1 == 0 && c2 == 0) { - S_14(0); - for (int c4 = 0; c4 <= min(31, n - 1); c4 += 1) - S_19(c4, 0); - } - } +for (int c0 = 0; c0 < m; c0 += 32) + for (int c1 = (n >= 32 && m >= c0 + 2) || (m == 1 && c0 == 0) ? 0 : 32 * n - 32 * floord(31 * n + 31, 32); c1 <= ((n <= -1 && c0 == 0) || (m == 1 && n >= 0 && c0 == 0) ? max(0, n - 1) : n); c1 += 32) + for (int c2 = c0; c2 <= (m >= 2 && c0 + 31 >= m && n >= c1 && c1 + 31 >= n ? 2 * m - 3 : (m >= 2 * c0 + 63 && c1 <= -32 && n >= c1 && c1 + 31 >= n) || (m >= c0 + 32 && 2 * c0 + 62 >= m && n >= c1 && c1 + 31 >= n) || (n >= 0 && c0 >= 32 && m >= 2 * c0 + 63 && c1 == n) || (m >= 63 && n >= 32 && c0 == 0 && c1 == n) ? 2 * c0 + 61 : m - 1); c2 += 32) { + if (n >= c1 + 32 && c1 >= 0 && 2 * c0 >= c2 + 32) { + for (int c4 = 0; c4 <= 31; c4 += 1) + for (int c5 = max(0, c0 - c2 + 1); c5 <= min(31, m - c2 - 1); c5 += 1) + S_27(c0, c2 + c5, c1 + c4); + } else if (c0 >= 32 && c1 >= 0 && c2 >= 2 * c0) { + for (int c4 = 0; c4 <= min(31, n - c1 - 1); c4 += 1) + for (int c5 = 0; c5 <= min(31, m - c2 - 1); c5 += 1) + S_27(c0, c2 + c5, c1 + c4); + } else if (c0 == 0 && c1 >= 0) { + for (int c4 = 0; c4 <= min(31, n - c1 - 1); c4 += 1) + for (int c5 = 0; c5 <= min(31, m - c2 - 1); c5 += 1) { + if (c1 == 0 && c4 == 0) + S_14(c2 + c5); + S_19(c1 + c4, c2 + c5); + if (c2 + c5 >= 1) + S_27(0, c2 + c5, c1 + c4); + } + } + if (c1 >= 0) { + for (int c3 = 1; c3 <= min(31, (c2 / 2) - c0); c3 += 1) + for (int c4 = 0; c4 <= min(31, n - c1 - 1); c4 += 1) + for (int c5 = 0; c5 <= min(31, m - c2 - 1); c5 += 1) + S_27(c0 + c3, c2 + c5, c1 + c4); + if (n >= c1 + 32) { + for (int c3 = max(1, (c2 / 2) - c0 + 1); c3 <= min(min(31, m - c0 - 2), -c0 + c2 + 30); c3 += 1) + for (int c4 = 0; c4 <= 31; c4 += 1) + for (int c5 = max(0, c0 - c2 + c3 + 1); c5 <= min(31, m - c2 - 1); c5 += 1) + S_27(c0 + c3, c2 + c5, c1 + c4); + } else if (n <= 0 && c0 == 0 && c1 == 0) { + for (int c5 = 0; c5 <= min(31, m - c2 - 1); c5 += 1) + S_14(c2 + c5); + } + } + if (n >= c1 && c1 + 31 >= n) + for (int c3 = max(0, (c2 / 2) - c0 + 1); c3 <= min(31, m - c0 - 1); c3 += 1) { + for (int c4 = max(0, -c1); c4 < n - c1; c4 += 1) + for (int c5 = max(0, c0 - c2 + c3 + 1); c5 <= min(31, m - c2 - 1); c5 += 1) + S_27(c0 + c3, c2 + c5, c1 + c4); + for (int c5 = max(0, c0 - c2 + c3); c5 <= min(31, 2 * c0 - c2 + 2 * c3 - 1); c5 += 1) + S_29(-c0 + c2 - c3 + c5, c0 + c3); + } + } diff --git a/test_inputs/codegen/empty.c b/test_inputs/codegen/empty.c index 58f7b7b2..02057350 100644 --- a/test_inputs/codegen/empty.c +++ b/test_inputs/codegen/empty.c @@ -1,6 +1,6 @@ for (int c0 = 0; c0 <= 10; c0 += 1) { S0(c0); + S1(c0); if (c0 == 5) S2(); - S1(c0); } diff --git a/test_inputs/codegen/omega/if_then-1.c b/test_inputs/codegen/omega/if_then-1.c index 18ca3702..5e2cd821 100644 --- a/test_inputs/codegen/omega/if_then-1.c +++ b/test_inputs/codegen/omega/if_then-1.c @@ -2,8 +2,8 @@ for (int c0 = 1; c0 <= 100; c0 += 1) { if (n >= 2) s0(c0); for (int c1 = 1; c1 <= 100; c1 += 1) { + s2(c0, c1); if (n >= 2) s1(c0, c1); - s2(c0, c1); } } diff --git a/test_inputs/codegen/omega/if_then-2.c b/test_inputs/codegen/omega/if_then-2.c index 158b0782..b3f4a24c 100644 --- a/test_inputs/codegen/omega/if_then-2.c +++ b/test_inputs/codegen/omega/if_then-2.c @@ -2,8 +2,8 @@ for (int c0 = 1; c0 <= 100; c0 += 1) { if (n >= 2) { s0(c0); for (int c1 = 1; c1 <= 100; c1 += 1) { - s1(c0, c1); s2(c0, c1); + s1(c0, c1); } } else { for (int c1 = 1; c1 <= 100; c1 += 1) diff --git a/test_inputs/codegen/omega/if_then-3.c b/test_inputs/codegen/omega/if_then-3.c index bae078e4..94dc201e 100644 --- a/test_inputs/codegen/omega/if_then-3.c +++ b/test_inputs/codegen/omega/if_then-3.c @@ -2,8 +2,8 @@ if (n >= 2) { for (int c0 = 1; c0 <= 100; c0 += 1) { s0(c0); for (int c1 = 1; c1 <= 100; c1 += 1) { - s1(c0, c1); s2(c0, c1); + s1(c0, c1); } } } else { diff --git a/test_inputs/codegen/omega/iter9-0.c b/test_inputs/codegen/omega/iter9-0.c index d25a354a..baedaa09 100644 --- a/test_inputs/codegen/omega/iter9-0.c +++ b/test_inputs/codegen/omega/iter9-0.c @@ -1,10 +1,10 @@ for (int c0 = 1; c0 <= 15; c0 += 1) { if (((-exprVar1 + 15) % 8) + c0 <= 15) { - s4(c0); - s0(c0); + s1(c0); s3(c0); s2(c0); - s1(c0); + s0(c0); + s4(c0); } if (((-exprVar1 + 15) % 8) + c0 <= 15 || (exprVar1 - c0 + 1) % 8 == 0) s5(c0); diff --git a/test_inputs/codegen/omega/m12-1.c b/test_inputs/codegen/omega/m12-1.c index eba7c8a6..f72181e7 100644 --- a/test_inputs/codegen/omega/m12-1.c +++ b/test_inputs/codegen/omega/m12-1.c @@ -10,8 +10,8 @@ } for (int c1 = 1; c1 <= m; c1 += 1) { for (int c3 = 1; c3 <= n; c3 += 1) { - s5(3, c1, 1, c3); s4(3, c1, 1, c3); + s5(3, c1, 1, c3); } for (int c3 = 1; c3 <= n; c3 += 1) { s7(3, c1, 2, c3); diff --git a/test_inputs/codegen/omega/wak1-0.c b/test_inputs/codegen/omega/wak1-0.c dissimilarity index 82% index 2c310e8d..32ea68ec 100644 --- a/test_inputs/codegen/omega/wak1-0.c +++ b/test_inputs/codegen/omega/wak1-0.c @@ -1,27 +1,27 @@ -{ - for (int c0 = a2; c0 <= min(min(a1 - 1, a3 - 1), b2); c0 += 1) - s1(c0); - for (int c0 = a1; c0 <= min(b1, a3 - 1); c0 += 1) { - s0(c0); - if (c0 >= a2 && b2 >= c0) - s1(c0); - } - for (int c0 = max(max(a1, b1 + 1), a2); c0 <= min(a3 - 1, b2); c0 += 1) - s1(c0); - for (int c0 = a3; c0 <= b3; c0 += 1) { - if (c0 >= a1 && b1 >= c0) - s0(c0); - if (c0 >= a2 && b2 >= c0) - s1(c0); - s2(c0); - } - for (int c0 = max(max(a3, b3 + 1), a2); c0 <= min(a1 - 1, b2); c0 += 1) - s1(c0); - for (int c0 = max(max(a1, a3), b3 + 1); c0 <= b1; c0 += 1) { - s0(c0); - if (c0 >= a2 && b2 >= c0) - s1(c0); - } - for (int c0 = max(max(max(max(a1, b1 + 1), a3), b3 + 1), a2); c0 <= b2; c0 += 1) - s1(c0); -} +{ + for (int c0 = a3; c0 <= min(min(a1 - 1, b3), a2 - 1); c0 += 1) + s2(c0); + for (int c0 = a1; c0 <= min(b1, a2 - 1); c0 += 1) { + s0(c0); + if (c0 >= a3 && b3 >= c0) + s2(c0); + } + for (int c0 = max(max(a1, b1 + 1), a3); c0 <= min(b3, a2 - 1); c0 += 1) + s2(c0); + for (int c0 = a2; c0 <= b2; c0 += 1) { + if (c0 >= a1 && b1 >= c0) + s0(c0); + s1(c0); + if (c0 >= a3 && b3 >= c0) + s2(c0); + } + for (int c0 = max(max(a3, a2), b2 + 1); c0 <= min(a1 - 1, b3); c0 += 1) + s2(c0); + for (int c0 = max(max(a1, a2), b2 + 1); c0 <= b1; c0 += 1) { + s0(c0); + if (c0 >= a3 && b3 >= c0) + s2(c0); + } + for (int c0 = max(max(max(max(a1, b1 + 1), a3), a2), b2 + 1); c0 <= b3; c0 += 1) + s2(c0); +} diff --git a/test_inputs/codegen/omega/wak1-1.c b/test_inputs/codegen/omega/wak1-1.c index 7fdda1dd..a09f7055 100644 --- a/test_inputs/codegen/omega/wak1-1.c +++ b/test_inputs/codegen/omega/wak1-1.c @@ -7,49 +7,49 @@ s1(c0); s2(c0); } + for (int c0 = max(max(a3, b3 + 1), a2); c0 <= min(a1 - 1, b2); c0 += 1) + s1(c0); for (int c0 = a1; c0 <= min(min(b1, a3 - 1), a2 - 1); c0 += 1) s0(c0); for (int c0 = max(a1, a2); c0 <= min(min(b1, a3 - 1), b2); c0 += 1) { s0(c0); s1(c0); } - for (int c0 = max(max(a1, b1 + 1), a2); c0 <= min(a3 - 1, b2); c0 += 1) - s1(c0); for (int c0 = max(a1, a3); c0 <= min(min(b1, b3), a2 - 1); c0 += 1) { s0(c0); s2(c0); } - for (int c0 = max(max(a1, b1 + 1), a3); c0 <= min(b3, a2 - 1); c0 += 1) - s2(c0); + for (int c0 = max(max(a1, a3), b3 + 1); c0 <= min(b1, a2 - 1); c0 += 1) + s0(c0); for (int c0 = max(max(a1, a3), a2); c0 <= min(min(b1, b3), b2); c0 += 1) { s0(c0); s1(c0); s2(c0); } - for (int c0 = max(max(max(a1, b1 + 1), a3), a2); c0 <= min(b3, b2); c0 += 1) { + for (int c0 = max(max(max(a1, a3), b3 + 1), a2); c0 <= min(b1, b2); c0 += 1) { + s0(c0); s1(c0); - s2(c0); } - for (int c0 = max(max(a3, a2), b2 + 1); c0 <= min(a1 - 1, b3); c0 += 1) - s2(c0); for (int c0 = max(max(a1, a2), b2 + 1); c0 <= min(b1, a3 - 1); c0 += 1) s0(c0); + for (int c0 = max(max(a3, a2), b2 + 1); c0 <= min(a1 - 1, b3); c0 += 1) + s2(c0); for (int c0 = max(max(max(a1, a3), a2), b2 + 1); c0 <= min(b1, b3); c0 += 1) { s0(c0); s2(c0); } - for (int c0 = max(max(max(max(a1, b1 + 1), a3), a2), b2 + 1); c0 <= b3; c0 += 1) - s2(c0); - for (int c0 = max(max(a3, b3 + 1), a2); c0 <= min(a1 - 1, b2); c0 += 1) - s1(c0); - for (int c0 = max(max(a1, a3), b3 + 1); c0 <= min(b1, a2 - 1); c0 += 1) - s0(c0); - for (int c0 = max(max(max(a1, a3), b3 + 1), a2); c0 <= min(b1, b2); c0 += 1) { + for (int c0 = max(max(max(max(a1, a3), b3 + 1), a2), b2 + 1); c0 <= b1; c0 += 1) s0(c0); + for (int c0 = max(max(a1, b1 + 1), a2); c0 <= min(a3 - 1, b2); c0 += 1) s1(c0); + for (int c0 = max(max(a1, b1 + 1), a3); c0 <= min(b3, a2 - 1); c0 += 1) + s2(c0); + for (int c0 = max(max(max(a1, b1 + 1), a3), a2); c0 <= min(b3, b2); c0 += 1) { + s1(c0); + s2(c0); } for (int c0 = max(max(max(max(a1, b1 + 1), a3), b3 + 1), a2); c0 <= b2; c0 += 1) s1(c0); - for (int c0 = max(max(max(max(a1, a3), b3 + 1), a2), b2 + 1); c0 <= b1; c0 += 1) - s0(c0); + for (int c0 = max(max(max(max(a1, b1 + 1), a3), a2), b2 + 1); c0 <= b3; c0 += 1) + s2(c0); } diff --git a/test_inputs/codegen/omega/wak2-1.c b/test_inputs/codegen/omega/wak2-1.c index b1f7286f..58c29711 100644 --- a/test_inputs/codegen/omega/wak2-1.c +++ b/test_inputs/codegen/omega/wak2-1.c @@ -14,18 +14,18 @@ if (c2 >= d2 + 1) { for (int c1_0 = c2; c1_0 <= d2; c1_0 += 1) s1(c0, c1_0); } else { - for (int c1_0 = c1; c1_0 <= min(d1, c2 - 1); c1_0 += 1) - s0(c0, c1_0); for (int c1_0 = c2; c1_0 <= min(c1 - 1, d2); c1_0 += 1) s1(c0, c1_0); + for (int c1_0 = c1; c1_0 <= min(d1, c2 - 1); c1_0 += 1) + s0(c0, c1_0); for (int c1_0 = max(c1, c2); c1_0 <= min(d1, d2); c1_0 += 1) { s0(c0, c1_0); s1(c0, c1_0); } - for (int c1_0 = max(c1, d2 + 1); c1_0 <= d1; c1_0 += 1) - s0(c0, c1_0); for (int c1_0 = max(max(c1, d1 + 1), c2); c1_0 <= d2; c1_0 += 1) s1(c0, c1_0); + for (int c1_0 = max(c1, d2 + 1); c1_0 <= d1; c1_0 += 1) + s0(c0, c1_0); } } for (int c0 = max(max(a1, a2), b2 + 1); c0 <= b1; c0 += 1) diff --git a/test_inputs/codegen/pldi2012/figure7_b.c b/test_inputs/codegen/pldi2012/figure7_b.c index 18ca3702..5e2cd821 100644 --- a/test_inputs/codegen/pldi2012/figure7_b.c +++ b/test_inputs/codegen/pldi2012/figure7_b.c @@ -2,8 +2,8 @@ for (int c0 = 1; c0 <= 100; c0 += 1) { if (n >= 2) s0(c0); for (int c1 = 1; c1 <= 100; c1 += 1) { + s2(c0, c1); if (n >= 2) s1(c0, c1); - s2(c0, c1); } } diff --git a/test_inputs/codegen/pldi2012/figure7_c.c b/test_inputs/codegen/pldi2012/figure7_c.c index 158b0782..b3f4a24c 100644 --- a/test_inputs/codegen/pldi2012/figure7_c.c +++ b/test_inputs/codegen/pldi2012/figure7_c.c @@ -2,8 +2,8 @@ for (int c0 = 1; c0 <= 100; c0 += 1) { if (n >= 2) { s0(c0); for (int c1 = 1; c1 <= 100; c1 += 1) { - s1(c0, c1); s2(c0, c1); + s1(c0, c1); } } else { for (int c1 = 1; c1 <= 100; c1 += 1) diff --git a/test_inputs/codegen/pldi2012/figure7_d.c b/test_inputs/codegen/pldi2012/figure7_d.c index bae078e4..94dc201e 100644 --- a/test_inputs/codegen/pldi2012/figure7_d.c +++ b/test_inputs/codegen/pldi2012/figure7_d.c @@ -2,8 +2,8 @@ if (n >= 2) { for (int c0 = 1; c0 <= 100; c0 += 1) { s0(c0); for (int c1 = 1; c1 <= 100; c1 += 1) { - s1(c0, c1); s2(c0, c1); + s1(c0, c1); } } } else { diff --git a/test_inputs/codegen/shift2.c b/test_inputs/codegen/shift2.c dissimilarity index 87% index 5f3501ac..a0571c98 100644 --- a/test_inputs/codegen/shift2.c +++ b/test_inputs/codegen/shift2.c @@ -1,44 +1,56 @@ -for (int c0 = 0; c0 <= 1; c0 += 1) { - for (int c2 = 0; c2 <= length; c2 += 32) { - if (length >= c2 + 1) { - for (int c3 = 0; c3 <= length; c3 += 32) { - for (int c5 = 0; c5 <= min(31, length - c2 - 1); c5 += 1) { - for (int c6 = max(0, -c3 + 1); c6 <= min(min(31, length - c3), 2 * c2 - c3 + 2 * c5 - 1); c6 += 1) - S_0(c0, c2 + c5, c3 + c6 - 1); - if (c2 + c5 >= 1 && 2 * c2 + 2 * c5 >= c3 && c3 + 30 >= 2 * c2 + 2 * c5) { - S_3(c0, 0, c2 + c5); - if (length >= 2 * c2 + 2 * c5) - S_0(c0, c2 + c5, 2 * c2 + 2 * c5 - 1); - } - for (int c6 = max(0, 2 * c2 - c3 + 2 * c5 + 1); c6 <= min(31, length - c3); c6 += 1) - S_0(c0, c2 + c5, c3 + c6 - 1); - } - if (length <= 15 && c2 == 0 && c3 == 0) - S_4(c0); - if (c3 >= 2 * c2 && 2 * c2 + 32 >= c3) - for (int c4 = 1; c4 <= min(min(31, length - 2), (c3 / 2) + 14); c4 += 1) - for (int c5 = max((c3 / 2) - c2, -c2 + c4 + 1); c5 <= min(length - c2 - 1, (c3 / 2) - c2 + 15); c5 += 1) - S_3(c0, c4, c2 + c5); - } - for (int c3 = max(2 * c2, -(length % 32) + length + 32); c3 <= min(2 * length - 2, 2 * c2 + 62); c3 += 32) - for (int c4 = 0; c4 <= min(31, length - 2); c4 += 1) { - for (int c5 = max((c3 / 2) - c2, -c2 + c4 + 1); c5 <= min(length - c2 - 1, (c3 / 2) - c2 + 15); c5 += 1) - S_3(c0, c4, c2 + c5); - if (c3 + 30 >= 2 * length && c4 == 0) - S_4(c0); - } - if (c2 + 16 == length) - S_4(c0); - } else if (length >= 32) { - S_4(c0); - } else { - S_4(c0); - } - } - for (int c1 = 32; c1 < length - 1; c1 += 32) - for (int c2 = c1; c2 < length; c2 += 32) - for (int c3 = c2; c3 <= min(length - 1, c2 + 31); c3 += 16) - for (int c4 = 0; c4 <= min(min(31, length - c1 - 2), -c1 + c3 + 14); c4 += 1) - for (int c5 = max(-c2 + c3, c1 - c2 + c4 + 1); c5 <= min(length - c2 - 1, -c2 + c3 + 15); c5 += 1) - S_3(c0, c1 + c4, c2 + c5); -} +for (int c0 = 0; c0 <= 1; c0 += 1) { + for (int c1 = 0; c1 < length - 1; c1 += 32) { + for (int c2 = c1; c2 < length; c2 += 32) { + if (c1 == 0) + for (int c3 = 0; c3 <= min(length, 2 * c2 - 31); c3 += 32) + for (int c5 = 0; c5 <= min(31, length - c2 - 1); c5 += 1) + for (int c6 = max(0, -c3 + 1); c6 <= min(31, length - c3); c6 += 1) + S_0(c0, c2 + c5, c3 + c6 - 1); + for (int c3 = 2 * c2; c3 <= min(2 * length - 2, 2 * c2 + 62); c3 += 32) + for (int c4 = 0; c4 <= min(min(31, length - c1 - 2), (c3 / 2) - c1 + 14); c4 += 1) { + if (c1 == 0 && c2 == 0 && c4 == 0) + for (int c6 = max(0, -c3 + 1); c6 <= min(31, length - c3); c6 += 1) + S_0(c0, 0, c3 + c6 - 1); + if (c1 == 0 && c3 == 2 * c2 + 32 && c4 == 0) + for (int c5 = max(0, -c2 + 1); c5 <= 15; c5 += 1) + for (int c6 = 0; c6 <= min(31, length - 2 * c2 - 32); c6 += 1) + S_0(c0, c2 + c5, 2 * c2 + c6 + 31); + for (int c5 = max((c3 / 2) - c2, c1 - c2 + c4 + 1); c5 <= min(length - c2 - 1, (c3 / 2) - c2 + 15); c5 += 1) { + if (c1 == 0 && c4 == 0) + for (int c6 = max(0, -c3 + 1); c6 <= min(length - c3, 2 * c2 - c3 + 2 * c5 - 1); c6 += 1) + S_0(c0, c2 + c5, c3 + c6 - 1); + S_3(c0, c1 + c4, c2 + c5); + if (c1 == 0 && c4 == 0 && length >= 2 * c2 + 2 * c5) + S_0(c0, c2 + c5, 2 * c2 + 2 * c5 - 1); + if (c1 == 0 && c4 == 0) + for (int c6 = 2 * c2 - c3 + 2 * c5 + 1; c6 <= min(31, length - c3); c6 += 1) + S_0(c0, c2 + c5, c3 + c6 - 1); + } + if (c1 == 0 && c3 == 2 * c2 && c4 == 0) + for (int c5 = 16; c5 <= min(31, length - c2 - 1); c5 += 1) + for (int c6 = max(0, -2 * c2 + 1); c6 <= min(31, length - 2 * c2); c6 += 1) + S_0(c0, c2 + c5, 2 * c2 + c6 - 1); + if (c1 == 0 && c3 + 30 >= 2 * length && c4 == 0) + S_4(c0); + } + if (c1 == 0) { + for (int c3 = 2 * c2 + 64; c3 <= length; c3 += 32) + for (int c5 = 0; c5 <= 31; c5 += 1) + for (int c6 = 0; c6 <= min(31, length - c3); c6 += 1) + S_0(c0, c2 + c5, c3 + c6 - 1); + if (c2 + 16 == length) + S_4(c0); + } + } + if (c1 == 0 && length % 32 == 0) + S_4(c0); + } + if (length <= 1) + for (int c5 = 0; c5 <= length; c5 += 1) { + if (c5 == length) { + S_4(c0); + } else { + S_0(c0, 0, 0); + } + } +} -- 2.11.4.GIT