Bug 44676 - [4.5/4.6 Regression] ICE: in loop_entry_phi_arg, at graphite-sese-to-poly.c:89 with -fgraphite-identity -fprofile-generate
Summary: [4.5/4.6 Regression] ICE: in loop_entry_phi_arg, at graphite-sese-to-poly.c:8...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.5.3
: P2 normal
Target Milestone: 4.5.3
Assignee: Sebastian Pop
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-26 00:29 UTC by Zdenek Sojka
Modified: 2010-12-07 16:34 UTC (History)
2 users (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work: 4.6.0
Known to fail:
Last reconfirmed: 2010-07-22 17:02:04


Attachments
reduced testcase (from gcc.dg/pr28935.c) (114 bytes, text/plain)
2010-06-26 00:30 UTC, Zdenek Sojka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2010-06-26 00:29:40 UTC
Command line:
$ gcc -O2 -fgraphite-identity -fprofile-generate testcase.c
or
$ gcc -O -funswitch-loops -fgraphite-identity -fprofile-generate testcase.c

Compiler output:
$ gcc -O -funswitch-loops -fgraphite-identity -fprofile-generate testcase.c
testcase.c: In function 'extend_options':
testcase.c:2:1: internal compiler error: in loop_entry_phi_arg, at graphite-sese-to-poly.c:89
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r161383 - crash
r158095 - crash
r153685 - OK
4.5 r158978 - crash
4.4 r160770 - OK (with checking)
Comment 1 Zdenek Sojka 2010-06-26 00:30:55 UTC
Created attachment 21011 [details]
reduced testcase (from gcc.dg/pr28935.c)

Command line:
$ gcc -O -funswitch-loops -fgraphite-identity -fprofile-generate pr44676.c
Comment 2 Sebastian Pop 2010-07-22 17:02:04 UTC
Mine.

On trunk I am able to reproduce the ICE.
This is fixed in the Graphite branch, probably by the cleanup of the IV canonicalization.
I will investigate a little bit more what happens in trunk, and if this is really fixed by my changes in the Graphite branch I will close this PR when these changes will be committed to trunk.
 
Sebastian
Comment 3 Richard Biener 2010-07-31 09:29:56 UTC
GCC 4.5.1 is being released, adjusting target milestone.
Comment 4 Zdenek Sojka 2010-11-18 15:46:05 UTC
This seems to have disappeared between r161659 and r163636.
I can't reproduce it anymore with r166868/x86_64-linux.
Comment 5 Sebastian Pop 2010-12-06 19:52:36 UTC
Git bisect points out that on trunk this was fixed by
http://gcc.gnu.org/viewcvs?view=revision&revision=163105
Comment 6 Sebastian Pop 2010-12-07 15:18:41 UTC
Author: spop
Date: Tue Dec  7 15:18:39 2010
New Revision: 167542

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167542
Log:
Fix PR44676: fix invariant phi node removal.

Backport from trunk
http://gcc.gnu.org/viewcvs?view=revision&revision=163105

2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>

	Backport from mainline:
	2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/44676
	* graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
	phi_arg_in_outermost_loop.
	(remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
	(remove_invariant_phi): Same.

Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/graphite-sese-to-poly.c
Comment 7 Sebastian Pop 2010-12-07 15:20:10 UTC
Fixed.
Comment 8 H.J. Lu 2010-12-07 16:00:37 UTC
Missing testcases for both trunk and 4.5 branch.
Comment 9 Sebastian Pop 2010-12-07 16:27:33 UTC
Author: spop
Date: Tue Dec  7 16:27:28 2010
New Revision: 167554

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167554
Log:
Add missing testcase for PR44676.

2010-12-07  Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/44676
	* gcc.dg/graphite/id-pr44676.c: New.

Added:
    trunk/gcc/testsuite/gcc.dg/graphite/id-pr44676.c
Modified:
    trunk/gcc/testsuite/ChangeLog
Comment 10 Sebastian Pop 2010-12-07 16:33:03 UTC
Author: spop
Date: Tue Dec  7 16:32:59 2010
New Revision: 167555

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167555
Log:
Add missing testcase for PR44676.

2010-12-07  Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/44676
	* gcc.dg/graphite/id-pr44676.c: New.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/graphite/id-pr44676.c
Modified:
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
Comment 11 Sebastian Pop 2010-12-07 16:34:44 UTC
Fixed.