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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, either the vectorizer needs to know that on this target signed vector
extension (vec_unpack_{lo,hi}_expr) is more expensive than unsigned one
(through costs, other means) and if there is a cost difference between them,
try to look at VRP info whether it is known to have zero MSB and thus both sign
and zero extension do the same thing and based on that choose the cheaper
extension.
Unfortunately we don't have that VRP info available right now, we have only
  _ifc__30 = _4 > 127 ? _24 : 0;
  # RANGE [0, 9223372036854775807] NONZERO 9223372036854775807
  prephitmp_27 = sum_19 + _ifc__30;
because ifc__30 is created during ifcvt pass and VRP info hasn't been computed
for that.
So, it would have to be smarts in the on-demand VRP if we ever get that.

Or, to optimize this later on, e.g. during expansion, we'd need value ranges
for integral vectors, either precise ones which would have a separate value
range for each element, or at least one conservative one that would cover all
elements (easier/smaller to preserve, but VRP would need to be changed to also
handle these conservative or full ranges for vector elements).

Reply via email to