This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/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: Tue, 16 Aug 2016 18:55:13 +0000
- Subject: [Bug middle-end/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 #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
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.
Following code in i386.c:
/* Enable prefetch{,w} instructions for -m3dnow and -mprefetchwt1. */
if (TARGET_3DNOW_P (opts->x_ix86_isa_flags)
|| TARGET_PREFETCHWT1_P (opts->x_ix86_isa_flags))
opts->x_ix86_isa_flags
|= OPTION_MASK_ISA_PRFCHW & ~opts->x_ix86_isa_flags_explicit;
will then try to set the option, but it won't succeed, due to the above
handling of explicit compile flags.