This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/48648] internal compiler error: in translate_clast, at graphite-clast-to-gimple.c:1123
- From: "spop at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 28 Jul 2011 21:57:53 +0000
- Subject: [Bug tree-optimization/48648] internal compiler error: in translate_clast, at graphite-clast-to-gimple.c:1123
- Auto-submitted: auto-generated
- References: <bug-48648-4@http.gcc.gnu.org/bugzilla/>
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.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.
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