public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/94301] New: Missed vector-vector CTOR / permute simplification
@ 2020-03-24 14:43 rguenth at gcc dot gnu.org
  2020-03-24 15:13 ` [Bug tree-optimization/94301] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-03-24 14:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94301

            Bug ID: 94301
           Summary: Missed vector-vector CTOR / permute simplification
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

When the vectorizer creates sth stupid like

  _11 = __MEM <vector(1) double> ((double *)vectp_y.3_4);
  vect__2.5_15 = _Literal (vector(2) double) {_11, _Literal (vector(1) double)
{ 0.0 }};
  vectp_y.3_16 = vectp_y.3_4 + 16ul;
  _17 = __MEM <vector(1) double> ((double *)vectp_y.3_16);
  vect__2.6_18 = _Literal (vector(2) double) {_17, _Literal (vector(1) double)
{ 0.0 }};
  vect__2.7_19 = __VEC_PERM (vect__2.5_15, vect__2.6_18, _Literal (vector(2)
ssizetype) { 0l, 2l });
  _20 = __VEC_PERM (vect__2.7_19, vect__2.7_19, _Literal (vector(2) ssizetype)
{ 0l, 0l });
  _21 = __VEC_PERM (vect__2.7_19, vect__2.7_19, _Literal (vector(2) ssizetype)
{ 1l, 1l });

we fail to combine those instructions to

  _20 = { _11, _11 };
  _21 = { _17, _17 };

and instead end up with

  _11 = MEM[symbol: y, index: ivtmp.13_10, offset: _Literal (double *) 0];
  vect__2.5_15 = _Literal (vector(2) double) {_11, _Literal (vector(1) double)
{ 0.0 }};
  _17 = MEM[symbol: y, index: ivtmp.13_10, offset: _Literal (double *) 16];
  vect__2.7_19 = __BIT_INSERT (vect__2.5_15, _17, 64u);
  _20 = __VEC_PERM (vect__2.7_19, vect__2.7_19, _Literal (vector(2) ssizetype)
{ 0l, 0l });
  _21 = __VEC_PERM (vect__2.7_19, vect__2.7_19, _Literal (vector(2) ssizetype)
{ 1l, 1l });

where RTL expansion even ICEs on when trying to expand the __BIT_INSERT,
probably because of the V1DFmode insert which eventually ends up as
BLKmode to store_bit_field:

#4  0x0000000000d27c83 in store_bit_field (str_rtx=0x7ffff6dab000, bitsize=...,
bitnum=..., 
    bitregion_start=..., bitregion_end=..., fieldmode=E_BLKmode,
value=0x7ffff6da3888, 
    reverse=false) at ../../src/trunk/gcc/expmed.c:1174


That said, the vector-vector CTORs are probably unhandled in forwprop
simplifications.

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

end of thread, other threads:[~2021-12-12 13:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24 14:43 [Bug tree-optimization/94301] New: Missed vector-vector CTOR / permute simplification rguenth at gcc dot gnu.org
2020-03-24 15:13 ` [Bug tree-optimization/94301] " rguenth at gcc dot gnu.org
2020-09-01  9:32 ` rguenth at gcc dot gnu.org
2020-09-02  9:04 ` rguenth at gcc dot gnu.org
2021-12-12 13:26 ` pinskia 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).