http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48648
--- Comment #11 from Sebastian Pop <spop at gcc dot gnu.org> 2011-07-28 21:57:15 UTC --- Author: spop Date: Thu Jul 28 21:57:10 2011 New Revision: 176901 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176901 Log: 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....@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. Added: trunk/gcc/testsuite/gcc.dg/graphite/id-pr48648.c Modified: trunk/gcc/ChangeLog trunk/gcc/graphite-clast-to-gimple.c trunk/gcc/testsuite/ChangeLog