[Bug tree-optimization/94301] New: Missed vector-vector CTOR / permute simplification
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 24 14:43:09 GMT 2020
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.
More information about the Gcc-bugs
mailing list