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

--- Comment #17 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #16)
> (In reply to Richard Earnshaw from comment #15)
> > It seems perverse to me that you have a standard named pattern in the x86
> > backend that is enabled, but then you somehow expect the generic parts of
> > the compiler to know that it shouldn't be used.
> 
> They should be used, but only if the user code asks for it explicitly.
> So, say a 32-byte generic vector in user code, or the <x86intrin.h>
> intrinsics that need 32-byte vectors are just fine.
> The option just asks that the compiler tries hard not to introduce those on
> its own (e.g. vectorization but this string ops expansion is similar to
> that).
> 
> With those selected ISAs, such instructions are available, but on some CPUs
> use of those is not really performance beneficial and using smaller vectors
> might get better results.

So the intrinsic should use a non-standard name to implement the expansion. 
Then the well-known name can be disabled and the mid-end will not use it.  We
have cases like that in the neon handling of intrinsics, for example to handle
that the intrinsics need to work even without fast-math.

Reply via email to