This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/77270] Flag -mprftchw is shared with 3dnow for -march=k8
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 20 Aug 2016 17:10:20 +0000
- Subject: [Bug target/77270] Flag -mprftchw is shared with 3dnow for -march=k8
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-77270-4@http.gcc.gnu.org/bugzilla/>
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.