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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-07-27
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's done with -O3 since the vectorizer handles this.  There's a pattern
matching phase in forwprop which also handles some cases but it does not handle
this specific case (and it's a bit messy already).  forwprop eventually sees

v16b gcc_cannot_shuffle_with_cast (v2si64 x)
{
  v16b b0;
  char _1;
  char _2;
  char _3;
  char _4;

  <bb 2> [local count: 1073741824]:
  _1 = BIT_FIELD_REF <x_5(D), 8, 0>;
  _2 = BIT_FIELD_REF <x_5(D), 8, 32>;
  _3 = BIT_FIELD_REF <x_5(D), 8, 64>;
  _4 = BIT_FIELD_REF <x_5(D), 8, 96>; 
  b0_6 = {_1, _1, _1, _1, _2, _2, _2, _2, _3, _3, _3, _3, _4, _4, _4, _4};
  return b0_6;

and early forwprop

  <bb 2> :
  _1 = VIEW_CONVERT_EXPR<v16b>(x_18(D));
  _2 = BIT_FIELD_REF <_1, 8, 0>;
  _3 = BIT_FIELD_REF <_1, 8, 0>;
...
  b0_20 = {_2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16,
_17};

Reply via email to