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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-05-27
          Component|target                      |tree-optimization
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think we simply miss folding __builtin_memcmp_eq (&x, &y, CST) to
x != y for compatible register types x/y and CST equal to the registers size.
Of course only for integral typed registers (we might be able to use
VIEW_CONVERT_EXPR to convert to an integer [vector] we can compare though).

I think there's a related bug to "inline" memcmp_eq if it can be performed
with a single register compare (similar to how we inline memcpy).  I
thought we already do this (but IIRC only for size == 1).  Might be we
only do this during RTL expansion.

Reply via email to