Fix PR48648: Handle CLAST assignments.
The CLAST produced by CLooG-ISL contains an assignment and GCC chokes
on it. The exact CLAST contains an assignment followed by an if:
scat_1 = max(0,ceild(T_4-7,8));
if (scat_1 <= min(1,floord(T_4-1,8))) {
S7(scat_1);
}
This is equivalent to a loop that iterates only once, and so CLooG
generates an assignment followed by an if instead of a loop. This is
an important optimization that was improved in ISL, that allows
if-conversion: imagine GCC having to figure out that a loop like the
following actually iterates only once, and can be converted to an if:
for (scat_1 = max(0,ceild(T_4-7,8)); scat_1 <= min(1,floord(T_4-1,8)); scat_1++)
S7(scat_1);
This patch implements the translation of CLAST assignments.
Bootstrapped and tested on amd64-linux.
2011-07-28 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/48648
* graphite-clast-to-gimple.c (clast_get_body_of_loop): Handle
CLAST assignments.
(translate_clast): Same.
(translate_clast_assignment): New.
* gcc.dg/graphite/id-pr48648.c: New.
From-SVN: r176901