[Bug tree-optimization/81987] [8 Regression] ICE in verify_ssa with -O3 -march=skylake-avx512

2017-09-06 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81987

Bill Schmidt  changed:

   What|Removed |Added

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

--- Comment #12 from Bill Schmidt  ---
Now fixed everywhere.  Thanks again for the report!

[Bug tree-optimization/81987] [8 Regression] ICE in verify_ssa with -O3 -march=skylake-avx512

2017-09-06 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81987

--- Comment #11 from Bill Schmidt  ---
Author: wschmidt
Date: Wed Sep  6 18:48:50 2017
New Revision: 251817

URL: https://gcc.gnu.org/viewcvs?rev=251817=gcc=rev
Log:
[gcc]

2017-09-06  Bill Schmidt  

Backport from mainline:
2017-08-30  Bill Schmidt  

PR tree-optimization/81987
* gimple-ssa-strength-reduction.c (insert_initializers): Don't
insert an initializer in a location not dominated by the stride
definition.

[gcc/testsuite]

2017-09-06  Bill Schmidt  

Backport from mainline:
2017-08-30  Bill Schmidt  

PR tree-optimization/81987
* g++.dg/torture/pr81987.C: New file.


Added:
branches/gcc-5-branch/gcc/testsuite/g++.dg/torture/pr81987.C
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/gimple-ssa-strength-reduction.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug tree-optimization/81987] [8 Regression] ICE in verify_ssa with -O3 -march=skylake-avx512

2017-09-06 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81987

--- Comment #10 from Bill Schmidt  ---
Author: wschmidt
Date: Wed Sep  6 18:44:51 2017
New Revision: 251816

URL: https://gcc.gnu.org/viewcvs?rev=251816=gcc=rev
Log:
[gcc]

2017-09-06  Bill Schmidt  

Backport from mainline:
2017-08-30  Bill Schmidt  

PR tree-optimization/81987
* gimple-ssa-strength-reduction.c (insert_initializers): Don't
insert an initializer in a location not dominated by the stride
definition.

[gcc/testsuite]

2017-09-06  Bill Schmidt  

Backport from mainline:
2017-08-30  Bill Schmidt  

PR tree-optimization/81987
* g++.dg/torture/pr81987.C: New file.


Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/torture/pr81987.C
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/gimple-ssa-strength-reduction.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug tree-optimization/81987] [8 Regression] ICE in verify_ssa with -O3 -march=skylake-avx512

2017-09-06 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81987

--- Comment #9 from Bill Schmidt  ---
Author: wschmidt
Date: Wed Sep  6 18:42:56 2017
New Revision: 251815

URL: https://gcc.gnu.org/viewcvs?rev=251815=gcc=rev
Log:
[gcc]

2017-09-06  Bill Schmidt  

Backport from mainline:
2017-08-30  Bill Schmidt  

PR tree-optimization/81987
* gimple-ssa-strength-reduction.c (insert_initializers): Don't
insert an initializer in a location not dominated by the stride
definition.

[gcc/testsuite]

2017-09-06  Bill Schmidt  

Backport from mainline:
2017-08-30  Bill Schmidt  

PR tree-optimization/81987
* g++.dg/torture/pr81987.C: New file.


Added:
branches/gcc-7-branch/gcc/testsuite/g++.dg/torture/pr81987.C
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/gimple-ssa-strength-reduction.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug tree-optimization/81987] [8 Regression] ICE in verify_ssa with -O3 -march=skylake-avx512

2017-08-30 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81987

--- Comment #8 from Bill Schmidt  ---
Fixed on trunk so far.  Holding this open until the fix is backported in about
a week.

[Bug tree-optimization/81987] [8 Regression] ICE in verify_ssa with -O3 -march=skylake-avx512

2017-08-30 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81987

--- Comment #7 from Bill Schmidt  ---
Author: wschmidt
Date: Wed Aug 30 20:04:07 2017
New Revision: 251547

URL: https://gcc.gnu.org/viewcvs?rev=251547=gcc=rev
Log:
[gcc]

2017-08-30  Bill Schmidt  

PR tree-optimization/81987
* gimple-ssa-strength-reduction.c (insert_initializers): Don't
insert an initializer in a location not dominated by the stride
definition.

[gcc/testsuite]

2017-08-30  Bill Schmidt  

PR tree-optimization/81987
* g++.dg/torture/pr81987.C: New file.


Added:
trunk/gcc/testsuite/g++.dg/torture/pr81987.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-ssa-strength-reduction.c
trunk/gcc/testsuite/ChangeLog

[Bug tree-optimization/81987] [8 Regression] ICE in verify_ssa with -O3 -march=skylake-avx512

2017-08-30 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81987

--- Comment #6 from Bill Schmidt  ---
Patch submitted here:  https://gcc.gnu.org/ml/gcc-patches/2017-08/msg01743.html

[Bug tree-optimization/81987] [8 Regression] ICE in verify_ssa with -O3 -march=skylake-avx512

2017-08-29 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81987

--- Comment #5 from Bill Schmidt  ---
-march is not required.  This repros on powerpc64le-linux-gnu as well with just
-O3.

[Bug tree-optimization/81987] [8 Regression] ICE in verify_ssa with -O3 -march=skylake-avx512

2017-08-28 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81987

--- Comment #4 from Bill Schmidt  ---
Sure, I'll try to get to this this week.

[Bug tree-optimization/81987] [8 Regression] ICE in verify_ssa with -O3 -march=skylake-avx512

2017-08-28 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81987

Richard Biener  changed:

   What|Removed |Added

 CC||wschmidt at gcc dot gnu.org

--- Comment #3 from Richard Biener  ---
It looks like the SLSR issue is latent before the change.  The change
introduces IL differences in PRE:

[54.69%] [count: INV]:
-  # prephitmp_66 = PHI 
-  pretmp_117 = _2;
-  pretmp_116 = c.0_1;
+  # prephitmp_72 = PHI 
+  # prephitmp_73 = PHI 
+  # prephitmp_74 = PHI <_2(9), _2(10), _2(33)>

the first CFG difference appears after VRP1 where we see a predecessor
edge order difference.

--- a/t.c.104t.vrp1 2017-08-28 11:14:39.031605121 +0200
+++ b/t.c.104t.vrp1 2017-08-28 11:14:33.247510516 +0200
@@ -294,10 +294,10 @@
 ;;7

 ;;   basic block 7, loop depth 0
-;;pred:   28
-;;6
+;;pred:   6
+;;28
 ;;5
-  # .MEM_60 = PHI <.MEM_57(28), .MEM_59(6), .MEM_39(5)>
+  # .MEM_60 = PHI <.MEM_59(6), .MEM_57(28), .MEM_39(5)>
   # VUSE <.MEM_60>
   # rhs access alignment 16+0
   d.6_6 = d;

That's expected given we change the order we install edges in split_edge.

The PRE IL change is also somewhat expected as it uses post-order on the
inverted graph to compute ANTIC_IN and this order is dependent on the
order of edges in pred.  I will poke a bit to see why there's a difference
in what PRE finally does.

So Bill - can you look at the SLSR issue?

[Bug tree-optimization/81987] [8 Regression] ICE in verify_ssa with -O3 -march=skylake-avx512

2017-08-28 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81987

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
   Target Milestone|--- |8.0

--- Comment #2 from Richard Biener  ---
I will have a looksee.

[Bug tree-optimization/81987] [8 Regression] ICE in verify_ssa with -O3 -march=skylake-avx512

2017-08-28 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81987

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-08-28
 CC||marxin at gcc dot gnu.org,
   ||rguenth at gcc dot gnu.org
Summary|ICE in verify_ssa with -O3  |[8 Regression] ICE in
   |-march=skylake-avx512   |verify_ssa with -O3
   ||-march=skylake-avx512
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, started with r251264. Bit reduced test-case:

short b, c, d, f, k, l, s;
int e, g, h, i, j, m, n, o, p, q, r, t;
long u;
void
v ()
{
  int a = c <= 602154393864UL;
  if (n ? 0 : c && e)
;
  else
{
  o = 0;
  if (c && f || d)
{
  if (f)
p = 0;
  short w ((236446151776511UL + c) * (2 ? d : 0) || b);
  s = w;
  if (g)
{
  if (n)
if (j)
  ;
else if (i)
  q = 0;
}
  else
{
  if (i)
m = 0;
  if (k)
{
  if (h)
r = 0;
  else
l = 0;
  u = (236446151776511UL + c) * (2 ? d : 0);
}
}
  if ((236446151776511UL + c) * (2 ? d : 0))
t = 0;
}
}
}