[Bug tree-optimization/90491] simple operation with unsigned long integer and conversion to float not vectorized

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu May 16 08:38:00 GMT 2019


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Target|                            |x86_64-*-*, i?86-*-*
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-05-16
                 CC|                            |rguenth at gcc dot gnu.org,
                   |                            |uros at gcc dot gnu.org
             Blocks|                            |53947
            Summary|simple operation with       |simple operation with
                   |unsigned integer and        |unsigned long integer and
                   |conversion to float/double  |conversion to float not
                   |not vectorized              |vectorized
     Ever confirmed|0                           |1

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue is the target claims it has no support for vectorized
unsigned long int to float conversion.  Your int() cast makes it a
signed int to float conversion which is just cvtpd2ps.

What the vectorizer doesn't do but eventually could, with
knowledge of the value-range of i, is first truncate the unsigned long
vector to a unsigned int vector and then do the conversion to float.

Or alternatively use a vector long to vector double and then vector
double to vector float conversion series.

Or the target could hide these tricks from us.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations


More information about the Gcc-bugs mailing list