[Bug tree-optimization/111268] [14 Regression] internal compiler error: in to_constant, at poly-int.h:504

2024-01-05 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111268

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
   Keywords|needs-bisection |

--- Comment #12 from Jakub Jelinek  ---
The #c8 testcase started to ICE with
r13-926-g08afab6f8642f58f702010ec196dce3b00955627
The #c3 one started to ICE with
r11-1445-g502d63b6d6141597bb18fd23c87736a1b384cf8f
So, not really sure why is this marked as [14 Regression] only.

[Bug tree-optimization/111268] [14 Regression] internal compiler error: in to_constant, at poly-int.h:504

2024-01-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111268

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||testsuite-fail

--- Comment #11 from Andrew Pinski  ---
testsuite/gcc.dg/torture/neon-sve-bridge.c ICEs at -O2 and above because of
this bug.

[Bug tree-optimization/111268] [14 Regression] internal compiler error: in to_constant, at poly-int.h:504

2023-10-17 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111268

--- Comment #10 from Richard Biener  ---
Btw, we have

(gdb) p debug (node)
t.c:3:6: note: node 0x3f341d0 (max_nunits=1, refcnt=1) vector(2) long unsigned
int
t.c:3:6: note: op: VEC_PERM_EXPR
t.c:3:6: note:  stmt 0 _1 = BIT_FIELD_REF ;
t.c:3:6: note:  stmt 1 _4 = BIT_FIELD_REF ;
t.c:3:6: note:  lane permutation { 0[0] 0[1] }
t.c:3:6: note:  children 0x3f34260
$1 = void
(gdb) p vtype
$2 = 

it looks like "compatibility" somehow requires/allows us to V_C_E the
permuted argument to a fixed length vector?  Otherwise vect_build_slp_tree_1
of course could check the BIT_FIELD_REF args are fixed length.

[Bug tree-optimization/111268] [14 Regression] internal compiler error: in to_constant, at poly-int.h:504

2023-10-17 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111268

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1
   Last reconfirmed|2023-09-07 00:00:00 |2023-10-17

--- Comment #9 from Richard Biener  ---
Re-confirmed.

during GIMPLE pass: slp
t.c: In function 'f':
t.c:3:6: internal compiler error: in to_constant, at poly-int.h:588
3 | void f(unsigned long *expected, svuint64_t values) {
  |  ^
0xe915f8 poly_int<2u, unsigned long>::to_constant() const
/space/rguenther/src/gcc/gcc/poly-int.h:588
0x1aedf84 vectorizable_slp_permutation_1
/space/rguenther/src/gcc/gcc/tree-vect-slp.cc:8766
0x1aeee54 vectorizable_slp_permutation
/space/rguenther/src/gcc/gcc/tree-vect-slp.cc:8931
0x1ae4321 vect_slp_analyze_node_operations_1
/space/rguenther/src/gcc/gcc/tree-vect-slp.cc:6049

the comment is outdated, we check

  unsigned olanes = ncopies * SLP_TREE_LANES (node);
  gcc_assert (repeating_p || multiple_p (olanes, nunits));

but then we have to adjust the following to poly arith somehow:

  if (repeating_p)
vperm.quick_push ({{p.first, 0}, p.second + active_lane[p.first]});
  else
{
  /* We checked above that the vectors are constant-length.  */
  unsigned vnunits = TYPE_VECTOR_SUBPARTS (vtype).to_constant ();
  unsigned vi = (active_lane[p.first] + p.second) / vnunits;
  unsigned vl = (active_lane[p.first] + p.second) % vnunits;
  vperm.quick_push ({{p.first, vi}, vl});

[Bug tree-optimization/111268] [14 Regression] internal compiler error: in to_constant, at poly-int.h:504

2023-09-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111268

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2023-09-07
 Ever confirmed|0   |1

--- Comment #8 from Andrew Pinski  ---
Reduced testcase:
```
#include 

void f(unsigned long *expected, svuint64_t values) {
  svst1_u64(svptrue_b64(), expected, values);
  expected[0] = (expected[0]+1);
  expected[1] = (expected[1]+1);
}
```

[Bug tree-optimization/111268] [14 Regression] internal compiler error: in to_constant, at poly-int.h:504

2023-09-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111268

--- Comment #7 from Andrew Pinski  ---
Interesting:
/* We checked above that the vectors are constant-length.  */
unsigned vnunits = TYPE_VECTOR_SUBPARTS (vtype).to_constant ();

But it is not constant ...

[Bug tree-optimization/111268] [14 Regression] internal compiler error: in to_constant, at poly-int.h:504

2023-09-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111268

--- Comment #6 from Andrew Pinski  ---
reducing ...

[Bug tree-optimization/111268] [14 Regression] internal compiler error: in to_constant, at poly-int.h:504

2023-09-05 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111268

--- Comment #5 from Mathieu Malaterre  ---
(In reply to Andrew Pinski from comment #4)
> Looks like this one is already fixed.

Same symptoms with 20230902 snapshot:

*
https://buildd.debian.org/status/fetch.php?pkg=highway=arm64=1.0.8%7Egit20230830.fed142a-1=1693905326=0

[Bug tree-optimization/111268] [14 Regression] internal compiler error: in to_constant, at poly-int.h:504

2023-09-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111268

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code,
   ||needs-bisection
  Component|target  |tree-optimization
   Target Milestone|--- |14.0
Summary|internal compiler error: in |[14 Regression] internal
   |to_constant, at |compiler error: in
   |poly-int.h:504  |to_constant, at
   ||poly-int.h:504

--- Comment #4 from Andrew Pinski  ---
Looks like this one is already fixed.