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

--- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to nightstrike from comment #5)
> (In reply to Uroš Bizjak from comment #2)
> > The problem is in the fact that for -march=native, the driver will pass
> > -mno-prfchw, since the relevant bit is not present in cpuid flags.
> 
> I'm a little confused.  -march=native gets it right.  It's -march=k8 that
> gets it wrong.  Does your patch make -march-k8 do the right thing now?

As it is now, -march=native (on k8) and -march=k8 will get consistent results,
that is - both will use 3DNOW prefetchw for *write* prefetches. If this is not
OK, we can now change "prefetch" instruction pattern to always emit SSE
prefetches instead of 3DNOW write prefetch for TARGET_SSE_PREFETCH targets, and
emit prefetchw only for TARGET_PRFCHW.

Reply via email to