[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-09 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670

Eric Botcazou  changed:

   What|Removed |Added

 CC||andrewm.roberts at sky dot com

--- Comment #14 from Eric Botcazou  ---
*** Bug 84800 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-05 Thread linux at carewolf dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670

Allan Jensen  changed:

   What|Removed |Added

 CC||linux at carewolf dot com

--- Comment #13 from Allan Jensen  ---
*** Bug 84718 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670

Richard Biener  changed:

   What|Removed |Added

 CC||mario-baumann at web dot de

--- Comment #12 from Richard Biener  ---
*** Bug 84716 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670

--- Comment #10 from Richard Biener  ---
Author: rguenth
Date: Mon Mar  5 13:18:12 2018
New Revision: 258243

URL: https://gcc.gnu.org/viewcvs?rev=258243=gcc=rev
Log:
2018-03-05  Richard Biener  

PR tree-optimization/84670
* tree-ssa-pre.c (struct bb_bitmap_sets): Add
visited_with_visited_succs
member.
(BB_VISITED_WITH_VISITED_SUCCS): New define.
(compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
(compute_antic_aux): Only assert the number of values in ANTIC_IN
doesn't grow if all successors (recursively) were visited at least
once.

* gcc.dg/pr84670-1.c: New testcase.
* gcc.dg/pr84670-2.c: Likewise.
* gcc.dg/pr84670-3.c: Likewise.
* gcc.dg/pr84670-4.c: Likewise.

Added:
trunk/gcc/testsuite/gcc.dg/pr84670-1.c
trunk/gcc/testsuite/gcc.dg/pr84670-2.c
trunk/gcc/testsuite/gcc.dg/pr84670-3.c
trunk/gcc/testsuite/gcc.dg/pr84670-4.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-pre.c

[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Richard Biener  ---
Fixed.

[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670

Richard Biener  changed:

   What|Removed |Added

 CC||bugzilla.gnu at coelho dot net

--- Comment #9 from Richard Biener  ---
*** Bug 84696 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670
Bug 84670 depends on bug 84696, which changed state.

Bug 84696 Summary: [8 Regression] ICE in compute_antic_aux, at 
tree-ssa-pre.c:2148
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84696

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |DUPLICATE

[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670

Richard Biener  changed:

   What|Removed |Added

 CC||krebbel at gcc dot gnu.org

--- Comment #8 from Richard Biener  ---
*** Bug 84706 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670

Richard Biener  changed:

   What|Removed |Added

   Keywords||needs-reduction

--- Comment #7 from Richard Biener  ---
(In reply to Gerald Pfeifer from comment #6)
> Created attachment 43559 [details]
> A testcase from Wine (fairly bigger)
> 
> This is a testcase from a full Wine build.  The others probably are
> better to nail this down, but for verification just in case a first
> fix addresses those but might not cover this one as well.

A fix for the original testcase in this bug also fixes this one (I can
reproduce the ICE with -O2 -m32 on x86_64-linux).

The other two testcases are unrelated - further reduction would be nice
with inclusion of the following to avoid reducing to a testcase for the
issue I have a patch for.  Note that in the end I'm going to remove
the assert again - none of the testcases exhibit the infinite antic-in
computation issues.

Index: gcc/tree-ssa-pre.c
===
--- gcc/tree-ssa-pre.c  (revision 258124)
+++ gcc/tree-ssa-pre.c  (working copy)
@@ -1393,8 +1393,12 @@ phi_translate_1 (pre_expr expr, bitmap_s
else
  {
unsigned value_id = get_expr_value_id (constant);
-   constant = find_leader_in_sets (value_id, set1, set2,
-   AVAIL_OUT (pred));
+   /* We want a leader in ANTIC_OUT to be consistent
+  with the rest of phi_translate but we don't have
+  that available (and it isn't complete yet) so
+  we resort to AVAIL_OUT here.  */
+   constant = bitmap_find_leader (AVAIL_OUT (pred),
+  value_id);
if (constant)
  return constant;
  }

The original use of set1/set2 is clearly bogus here, as the comment now
states we'd like to use ANTIC_OUT (pred) here but we are computing that
right now.  AVAIL_OUT is at least correct even if not 100% in spirit of
this function.  The other testcases show that phi_translate is effectively
removing things from the set which is what causes the issue.

[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-04 Thread gerald at pfeifer dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670

Gerald Pfeifer  changed:

   What|Removed |Added

 CC||gerald at pfeifer dot com

--- Comment #6 from Gerald Pfeifer  ---
Created attachment 43559
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43559=edit
A testcase from Wine (fairly bigger)

This is a testcase from a full Wine build.  The others probably are
better to nail this down, but for verification just in case a first
fix addresses those but might not cover this one as well.

[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-02 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||law at redhat dot com

--- Comment #5 from Jeffrey A. Law  ---
Created attachment 43551
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43551=edit
x86_64 testcase

Attaching x86-64 testcase.  Compile with -Os -fno-strict-overflow

[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-02 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670

--- Comment #4 from rguenther at suse dot de  ---
On March 2, 2018 5:07:59 PM GMT+01:00, "romain.geissler at amadeus dot com"
 wrote:
>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670
>
>Romain Geissler  changed:
>
>   What|Removed |Added
>
> CC||romain.geissler at amadeus dot com
>
>--- Comment #3 from Romain Geissler com> ---
>Hi,
>
>Note that in my case, this issue happens during a GNU toolchain
>bootstrap (ie
>gcc is not able to rebuild itself anymore).

If it gets too pervasive then please commit the obvious thing and disable the
assert for now. I'll likely will not be able to resolve this issue before
Monday. 

Richard.

[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-02 Thread romain.geissler at amadeus dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670

Romain Geissler  changed:

   What|Removed |Added

 CC||romain.geissler at amadeus dot 
com

--- Comment #3 from Romain Geissler  ---
Hi,

Note that in my case, this issue happens during a GNU toolchain bootstrap (ie
gcc is not able to rebuild itself anymore).

Cheers,
Romain

[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-02 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670

Franz Sirl  changed:

   What|Removed |Added

 CC||sirl at gcc dot gnu.org

--- Comment #2 from Franz Sirl  ---
Created attachment 43548
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43548=edit
another testcase

You just beat me to open this report :D

I'm adding another (but not so small) testcase.

[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-03-02
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
   Target Milestone|--- |8.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
*sigh*, mine.