public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/47447] New: "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used
@ 2011-01-24 21:24 asharif at gcc dot gnu.org
  2011-01-25 11:10 ` [Bug tree-optimization/47447] [4.3/4.4 Regression] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: asharif at gcc dot gnu.org @ 2011-01-24 21:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47447

           Summary: "Unable to coalesce ssa_names <x> and <y>" ICE in
                    tree-ssa-coalesce.c when -O3 is used
           Product: gcc
           Version: 4.4.6
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: asharif@gcc.gnu.org


Created attachment 23110
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23110
This is the input file to the compiler that produces an ICE.

To reproduce, use the attached file and run:

g++ -o /dev/null -S -O3 reduced.manual.inline.cc

You will get this message:

Unable to coalesce ssa_names <x> and <y> which are marked as MUST COALESCE.

This is reproducible with the latest (as of Jan 20th, 2011) 4-4 branch of gcc.
It seems to not happen with the trunk.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/47447] [4.3/4.4 Regression] "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used
  2011-01-24 21:24 [Bug tree-optimization/47447] New: "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used asharif at gcc dot gnu.org
@ 2011-01-25 11:10 ` rguenth at gcc dot gnu.org
  2011-01-26 22:12 ` asharif at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-25 11:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47447

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |4.2.4, 4.5.0, 4.5.1, 4.6.0
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|                            |2011.01.25 11:00:44
     Ever Confirmed|0                           |1
            Summary|"Unable to coalesce         |[4.3/4.4 Regression]
                   |ssa_names <x> and <y>" ICE  |"Unable to coalesce
                   |in tree-ssa-coalesce.c when |ssa_names <x> and <y>" ICE
                   |-O3 is used                 |in tree-ssa-coalesce.c when
                   |                            |-O3 is used
   Target Milestone|---                         |4.3.6
      Known to fail|                            |4.3.0, 4.3.5, 4.4.0, 4.4.4

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-25 11:00:44 UTC ---
Confirmed.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/47447] [4.3/4.4 Regression] "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used
  2011-01-24 21:24 [Bug tree-optimization/47447] New: "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used asharif at gcc dot gnu.org
  2011-01-25 11:10 ` [Bug tree-optimization/47447] [4.3/4.4 Regression] " rguenth at gcc dot gnu.org
@ 2011-01-26 22:12 ` asharif at gcc dot gnu.org
  2011-02-03 22:19 ` asharif at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: asharif at gcc dot gnu.org @ 2011-01-26 22:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47447

--- Comment #2 from asharif at gcc dot gnu.org 2011-01-26 21:50:26 UTC ---
It seems like this bug is reproducible on older versions of the trunk.

This change:

http://gcc.gnu.org/viewcvs?view=revision&revision=146776

seems to suppress it (or fix it?). Jan Hubicka is the original author of this
patch (from pretty-ipa I believe) and Richard brought it into mainline.

Jan, can you comment on this bug and confirm that your change does indeed fix
it?


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/47447] [4.3/4.4 Regression] "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used
  2011-01-24 21:24 [Bug tree-optimization/47447] New: "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used asharif at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-02-03 22:19 ` asharif at gcc dot gnu.org
@ 2011-02-03 22:19 ` asharif at gcc dot gnu.org
  2011-02-03 22:23 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: asharif at gcc dot gnu.org @ 2011-02-03 22:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47447

--- Comment #4 from asharif at gcc dot gnu.org 2011-02-03 22:19:37 UTC ---
Richard, check out the attached patch and let me know your thoughts.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/47447] [4.3/4.4 Regression] "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used
  2011-01-24 21:24 [Bug tree-optimization/47447] New: "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used asharif at gcc dot gnu.org
  2011-01-25 11:10 ` [Bug tree-optimization/47447] [4.3/4.4 Regression] " rguenth at gcc dot gnu.org
  2011-01-26 22:12 ` asharif at gcc dot gnu.org
@ 2011-02-03 22:19 ` asharif at gcc dot gnu.org
  2011-02-03 22:19 ` asharif at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: asharif at gcc dot gnu.org @ 2011-02-03 22:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47447

--- Comment #3 from asharif at gcc dot gnu.org 2011-02-03 22:19:10 UTC ---
Created attachment 23242
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23242
This patch fixes the problem, but may be pessimistic.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/47447] [4.3/4.4 Regression] "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used
  2011-01-24 21:24 [Bug tree-optimization/47447] New: "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used asharif at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-02-03 22:19 ` asharif at gcc dot gnu.org
@ 2011-02-03 22:23 ` pinskia at gcc dot gnu.org
  2011-02-03 22:25 ` asharif at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-02-03 22:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47447

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-02-03 22:23:36 UTC ---
I almost want to say LOOP_VINFO_NITERS should not have abnormal SSA's to begin
with.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/47447] [4.3/4.4 Regression] "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used
  2011-01-24 21:24 [Bug tree-optimization/47447] New: "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used asharif at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-02-03 22:23 ` pinskia at gcc dot gnu.org
@ 2011-02-03 22:25 ` asharif at gcc dot gnu.org
  2011-02-03 22:26 ` asharif at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: asharif at gcc dot gnu.org @ 2011-02-03 22:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47447

--- Comment #6 from asharif at gcc dot gnu.org 2011-02-03 22:25:01 UTC ---
What happens is tree vectorization introduces code in the preheader to check
for the loop iterations at runtime. The expression holding the number of
iterations may contain ssa names that are abnormal. This may extend their live
range (that is what happens in this testcase) and make them conflict with other
abnormal names.

That leads to an ICE.

I wonder what the other passes do that hoist such code effectively extending
the live ranges of abnormal ssa names.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/47447] [4.3/4.4 Regression] "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used
  2011-01-24 21:24 [Bug tree-optimization/47447] New: "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used asharif at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-02-03 22:25 ` asharif at gcc dot gnu.org
@ 2011-02-03 22:26 ` asharif at gcc dot gnu.org
  2011-03-01 19:40 ` asharif at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: asharif at gcc dot gnu.org @ 2011-02-03 22:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47447

--- Comment #7 from asharif at gcc dot gnu.org 2011-02-03 22:26:48 UTC ---
(In reply to comment #5)
> I almost want to say LOOP_VINFO_NITERS should not have abnormal SSA's to begin
> with.

Andrew, shouldn't it be fine to have abnormal SSAs as long as they don't
conflict? That may be the best solution -- i.e. bailing out only if they will
conflict later on, as opposed to what my patch does (it bails out as soon as an
abnormal name is detected).


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/47447] [4.3/4.4 Regression] "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used
  2011-01-24 21:24 [Bug tree-optimization/47447] New: "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used asharif at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-02-03 22:26 ` asharif at gcc dot gnu.org
@ 2011-03-01 19:40 ` asharif at gcc dot gnu.org
  2011-06-27 10:41 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: asharif at gcc dot gnu.org @ 2011-03-01 19:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47447

--- Comment #8 from asharif at gcc dot gnu.org 2011-03-01 19:39:49 UTC ---
Ping. Andrew or Richard, how can I rework my patch to address this issue?

Thanks,


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/47447] [4.3/4.4 Regression] "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used
  2011-01-24 21:24 [Bug tree-optimization/47447] New: "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used asharif at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2011-03-01 19:40 ` asharif at gcc dot gnu.org
@ 2011-06-27 10:41 ` rguenth at gcc dot gnu.org
  2011-06-27 15:07 ` rguenth at gcc dot gnu.org
  2012-03-13 16:23 ` [Bug tree-optimization/47447] [4.4 " jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-27 10:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47447

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/47447] [4.3/4.4 Regression] "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used
  2011-01-24 21:24 [Bug tree-optimization/47447] New: "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used asharif at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2011-06-27 10:41 ` rguenth at gcc dot gnu.org
@ 2011-06-27 15:07 ` rguenth at gcc dot gnu.org
  2012-03-13 16:23 ` [Bug tree-optimization/47447] [4.4 " jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-27 15:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47447

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.6                       |4.4.7

--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-27 12:14:40 UTC ---
4.3 branch is being closed, moving to 4.4.7 target.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/47447] [4.4 Regression] "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used
  2011-01-24 21:24 [Bug tree-optimization/47447] New: "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used asharif at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2011-06-27 15:07 ` rguenth at gcc dot gnu.org
@ 2012-03-13 16:23 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-13 16:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47447

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.4.7                       |4.5.0

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-13 13:04:29 UTC ---
Fixed in 4.5+, 4.4 is no longer supported.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-03-13 16:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-24 21:24 [Bug tree-optimization/47447] New: "Unable to coalesce ssa_names <x> and <y>" ICE in tree-ssa-coalesce.c when -O3 is used asharif at gcc dot gnu.org
2011-01-25 11:10 ` [Bug tree-optimization/47447] [4.3/4.4 Regression] " rguenth at gcc dot gnu.org
2011-01-26 22:12 ` asharif at gcc dot gnu.org
2011-02-03 22:19 ` asharif at gcc dot gnu.org
2011-02-03 22:19 ` asharif at gcc dot gnu.org
2011-02-03 22:23 ` pinskia at gcc dot gnu.org
2011-02-03 22:25 ` asharif at gcc dot gnu.org
2011-02-03 22:26 ` asharif at gcc dot gnu.org
2011-03-01 19:40 ` asharif at gcc dot gnu.org
2011-06-27 10:41 ` rguenth at gcc dot gnu.org
2011-06-27 15:07 ` rguenth at gcc dot gnu.org
2012-03-13 16:23 ` [Bug tree-optimization/47447] [4.4 " jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).