User account creation filtered due to spam.

Bug 57584 - [4.9 Regression] ice: SSA corruption: Unable to coalesce ssa_names
Summary: [4.9 Regression] ice: SSA corruption: Unable to coalesce ssa_names
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.9.0
: P3 normal
Target Milestone: 4.9.0
Assignee: Richard Biener
URL:
Keywords:
Depends on:
Blocks: 56982
  Show dependency treegraph
 
Reported: 2013-06-11 10:07 UTC by David Binderman
Modified: 2013-06-20 10:23 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2013-06-11 00:00:00


Attachments
gzipped C source code (101.91 KB, application/x-gzip)
2013-06-11 10:07 UTC, David Binderman
Details
autoreduced testcase (918 bytes, text/plain)
2013-06-11 14:33 UTC, Richard Biener
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2013-06-11 10:07:01 UTC
Created attachment 30289 [details]
gzipped C source code

The attached source code causes the following crash
on gcc-4.9 trunk dated 20130605 on an AMD x86_64 box
when compiled with -O3.

Unable to coalesce ssa_names 45 and 3671 which are marked as MUST COALESCE.
sp_45(ab) and  sp_3671(ab)
In file included from vm.c:661:0:
vm-engine.c: In function ‘vm_debug_engine’:
vm-engine.c:39:1: internal compiler error: SSA corruption
0x9ca5bf fail_abnormal_edge_coalesce
    ../../src/trunk/gcc/tree-ssa-coalesce.c:898
0x9ca5bf coalesce_partitions
    ../../src/trunk/gcc/tree-ssa-coalesce.c:1200
0x9ca5bf coalesce_ssa_name()
    ../../src/trunk/gcc/tree-ssa-coalesce.c:1337
0x981cee remove_ssa_form
    ../../src/trunk/gcc/tree-outof-ssa.c:900
0x981cee rewrite_out_of_ssa(ssaexpand*)
    ../../src/trunk/gcc/tree-outof-ssa.c:1133
0x60c694 gimple_expand_cfg
    ../../src/trunk/gcc/cfgexpand.c:4541
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Richard Biener 2013-06-11 13:15:48 UTC
Confirmed, reducing.
Comment 2 Richard Biener 2013-06-11 14:33:59 UTC
Created attachment 30291 [details]
autoreduced testcase

Mine anyway.
Comment 3 Richard Biener 2013-06-19 13:28:08 UTC
It's the vectorizer, thus fails at -O -ftree-vectorize already.
Comment 4 Richard Biener 2013-06-20 08:41:10 UTC
niter analysis computes

 (((unsigned long) sp_35(ab) - (unsigned long) (sp_3(ab) + 8)) + 7) / 8))

which the vectorizer inserts, obviously breaking coalescing of sp_35 and sp_3.
It's expand_simple_operations done in niter analysis that breaks this and
I have a patch to fix that.
Comment 5 Richard Biener 2013-06-20 10:23:01 UTC
Author: rguenth
Date: Thu Jun 20 10:22:33 2013
New Revision: 200237

URL: http://gcc.gnu.org/viewcvs?rev=200237&root=gcc&view=rev
Log:
2013-06-20  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/57584
	* tree-ssa-loop-niter.c (expand_simple_operations): Avoid including
	SSA names into the expanded expression that take part in
	abnormal coalescing.

	* gcc.dg/torture/pr57584.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr57584.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-loop-niter.c