[Bug tree-optimization/95356] [11 Regression] ICE in vect_get_constant_vectors, at tree-vect-slp.c:3635 since r11-564-g79f0451c67e8ed56

2020-05-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95356

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #12 from Richard Biener  ---
Fixed again.

[Bug tree-optimization/95356] [11 Regression] ICE in vect_get_constant_vectors, at tree-vect-slp.c:3635 since r11-564-g79f0451c67e8ed56

2020-05-29 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95356

--- Comment #11 from CVS Commits  ---
The master branch has been updated by Richard Biener :

https://gcc.gnu.org/g:ddf90b72d2a723decc487db6d3131846b9a618de

commit r11-717-gddf90b72d2a723decc487db6d3131846b9a618de
Author: Richard Biener 
Date:   Fri May 29 10:46:06 2020 +0200

tree-optimization/95356 - more vectorizable_shift massaging

The previous fix clashed with the rewrite to emit SLP invariants
during the SLP walk.  Thus the following adjusts the SLP tree
hacking vectorizable_shift does appropriately.

Still resisting the attempt of a rewrite of vectorizable_shift ...

2020-05-29  Richard Biener  

PR tree-optimization/95356
* tree-vect-stmts.c (vectorizable_shift): Do in-place SLP
node hacking during analysis.

[Bug tree-optimization/95356] [11 Regression] ICE in vect_get_constant_vectors, at tree-vect-slp.c:3635 since r11-564-g79f0451c67e8ed56

2020-05-28 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95356

--- Comment #10 from Richard Biener  ---
OK, so vectorizable_shift doing

  else if (dt[1] == vect_constant_def)
{
  /* Convert the scalar constant shift amounts in-place.  */
  slp_tree shift = SLP_TREE_CHILDREN (slp_node)[1];
  gcc_assert (SLP_TREE_DEF_TYPE (shift) == vect_constant_def);
  for (unsigned i = 0;
   i < SLP_TREE_SCALAR_OPS (shift).length (); ++i)
{
  SLP_TREE_SCALAR_OPS (shift)[i]
  = fold_convert (TREE_TYPE (vectype),
  SLP_TREE_SCALAR_OPS (shift)[i]);
  gcc_assert ((TREE_CODE (SLP_TREE_SCALAR_OPS (shift)[i])
   == INTEGER_CST));
}

no longer works because we already tried code-generating it.  The above would
need to happen at analysis time (ensuring the node is not shared - which would
be a problem for the above code as well).

[Bug tree-optimization/95356] [11 Regression] ICE in vect_get_constant_vectors, at tree-vect-slp.c:3635 since r11-564-g79f0451c67e8ed56

2020-05-28 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95356

--- Comment #9 from Martin Liška  ---
Reopening as the following is ICEing:

$ gcc /home/marxin/Programming/gcc/gcc/testsuite/gcc.target/i386/pr95356.c -c
-O3 -mavx512dq
during GIMPLE pass: slp
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/i386/pr95356.c: In
function ‘f1’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/i386/pr95356.c:8:1:
internal compiler error: in vect_create_constant_vectors, at
tree-vect-slp.c:3674
8 | f1 (void)
  | ^~
0x769846 vect_create_constant_vectors
/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:3674
0x769846 vect_schedule_slp_instance
/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:4066
0x10d3508 vect_schedule_slp_instance
/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:4071
0x10d3508 vect_schedule_slp_instance
/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:4071
0x10d9552 vect_schedule_slp(vec_info*)
/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:4303
0x10dbffc vect_slp_bb_region
/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:3342
0x10dbffc vect_slp_bb(basic_block_def*)
/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:3465
0x10dd9ef execute
/home/marxin/Programming/gcc/gcc/tree-vectorizer.c:1320
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug tree-optimization/95356] [11 Regression] ICE in vect_get_constant_vectors, at tree-vect-slp.c:3635 since r11-564-g79f0451c67e8ed56

2020-05-28 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95356

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #8 from Richard Biener  ---
FAILs again.

[Bug tree-optimization/95356] [11 Regression] ICE in vect_get_constant_vectors, at tree-vect-slp.c:3635 since r11-564-g79f0451c67e8ed56

2020-05-28 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95356

--- Comment #7 from CVS Commits  ---
The master branch has been updated by Richard Biener :

https://gcc.gnu.org/g:09df85393ce5501a28359d159670fd05c4d70abf

commit r11-687-g09df85393ce5501a28359d159670fd05c4d70abf
Author: Richard Biener 
Date:   Thu May 28 10:27:48 2020 +0200

tree-optimization/95273 - more vectorizable_shift massaging

Covering all bases in vectorizable_shift is hard - this makes sure
to appropriately handle the case of PR95356 without breaking others.

2020-05-28  Richard Biener  

PR tree-optimization/95273
PR tree-optimization/95356
* tree-vect-stmts.c (vectorizable_shift): Adjust when and to
what we set the vector type of the shift operand SLP node
again.

* gcc.target/i386/pr95356.c: New testcase.

[Bug tree-optimization/95356] [11 Regression] ICE in vect_get_constant_vectors, at tree-vect-slp.c:3635 since r11-564-g79f0451c67e8ed56

2020-05-27 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95356

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Richard Biener :

https://gcc.gnu.org/g:764ef40ba185ef9245a209ba9260d1e50bec6934

commit r11-658-g764ef40ba185ef9245a209ba9260d1e50bec6934
Author: Richard Biener 
Date:   Wed May 27 11:42:35 2020 +0200

tree-optimization/95356 - fix vectorizable_shift vector types

This makes sure to always use the same vector type for the shift
operand as for the shifted operand.

2020-05-27  Richard Biener  

PR tree-optimization/95356
* tree-vect-stmts.c (vectorizable_shift): Adjust vector
type for the shift operand.

[Bug tree-optimization/95356] [11 Regression] ICE in vect_get_constant_vectors, at tree-vect-slp.c:3635 since r11-564-g79f0451c67e8ed56

2020-05-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95356

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/95356] [11 Regression] ICE in vect_get_constant_vectors, at tree-vect-slp.c:3635 since r11-564-g79f0451c67e8ed56

2020-05-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95356

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

[Bug tree-optimization/95356] [11 Regression] ICE in vect_get_constant_vectors, at tree-vect-slp.c:3635 since r11-564-g79f0451c67e8ed56

2020-05-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95356

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

[Bug tree-optimization/95356] [11 Regression] ICE in vect_get_constant_vectors, at tree-vect-slp.c:3635 since r11-564-g79f0451c67e8ed56

2020-05-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95356

--- Comment #2 from Richard Biener  ---
So we get v4si for the vector type but the operand is long long int:

3683gcc_assert (vector_type
3684&& types_compatible_p (vector_type,
3685   get_vectype_for_scalar_type
3686 (vinfo, TREE_TYPE (op),
op_node)));

this is because vectorizable_shift is somewhat of a mess.  Fixinig.

[Bug tree-optimization/95356] [11 Regression] ICE in vect_get_constant_vectors, at tree-vect-slp.c:3635 since r11-564-g79f0451c67e8ed56

2020-05-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95356

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org

--- Comment #1 from Richard Biener  ---
Mine.

[Bug tree-optimization/95356] [11 Regression] ICE in vect_get_constant_vectors, at tree-vect-slp.c:3635 since r11-564-g79f0451c67e8ed56

2020-05-26 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95356

Martin Liška  changed:

   What|Removed |Added

   Target Milestone|--- |11.0
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-05-27