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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, I think the bug is in vect_look_through_possible_promotion, which doesn't
do what it claims to do is that what it returns can be cast to unprom->type and
then promoted to final precision and that it is the same as the original cast
sequence.
Here we have:
  _39 = (long int) iftmp.0_19;
in the loop and
  _4 = _2 >> a.4_3;
  iftmp.0_19 = (signed char) _4;
before the loop, with
  int _4;
  signed char iftmp.0_19;
  long int _39;
and we return _4 and unprom is { _4, int, vect_external_def, NULL }
(NULL caster because this is already outside of the loop).
(long int) (int) _4 is not equivalent to (long int) (signed char) (int) _4
though, so we should have returned iftmp.0_19 in this case and unprom {
iftmp.0_19, signed char, vect_external_def, caster }.

Reply via email to