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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-09-27

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks like a latent bug in reassoc:
```

  vector(2) unsigned int _11;
  intD.6 _6;
  intD.6 _8;

  vect__15.28_19 = VIEW_CONVERT_EXPR<vector(2) intD.6>(_3);
  _4 = BIT_FIELD_REF <vect__15.28_19, 32, 0>;
  _35 = BIT_FIELD_REF <vect__15.28_19, 32, 32>;
  _30 = _35 & _4;
  _28 = _30 & d_lsm.16_31;
...
  _62 = VIEW_CONVERT_EXPR<vector(2) unsigned int>(vect_i_7.24_45);
  _11 = _62 + { 11, 11 };
  _6 = BIT_FIELD_REF <_11, 32, 0>;
  _8 = BIT_FIELD_REF <_11, 32, 32>;
  _21 = _8 & _6;
  _34 = _21 & _28;
```

basically BIT_FIELD_REF has a type of `int` but the inner vector type of _11 is
`vector unsigned int`.

The VCE was removed by the following match pattern:
```
(simplify
 (BIT_FIELD_REF (view_convert @0) @1 @2)
 (BIT_FIELD_REF @0 @1 @2))
```

Which you expect really.

Confirmed.

Reply via email to