public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* option -mprfchw on 2 different Opteron cpus
@ 2016-05-01 20:25 NightStrike
  2016-05-02  9:55 ` Kumar, Venkataramanan
  0 siblings, 1 reply; 5+ messages in thread
From: NightStrike @ 2016-05-01 20:25 UTC (permalink / raw)
  To: gcc; +Cc: Jan Hubicka, Jakub Jelinek

Reposting from here:
https://gcc.gnu.org/ml/gcc-help/2016-05/msg00003.html

Not sure if this applies:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54210

If I compile on a k8 Opteron 248 with -march=native, I do not see
-mprfchw listed in the options in -fverbose-asm.  In the assembly, I
see this:

prefetcht0      (%rax)  # ivtmp.1160
prefetcht0      304(%rcx)       #
prefetcht0      (%rax)  # ivtmp.1160

If I compile on a bdver2 Opteron 6386 SE with -march=k8 (thus trying
to target the older system), I do see it listed in the options in
-fverbose-asm.  In the assembly, I see this:

prefetcht0      (%rax)  # ivtmp.1160
prefetcht0      304(%rcx)       #
prefetchw       (%rax)  # ivtmp.1160

(The third line is the only difference)

In both cases, I'm using gcc 4.9.3.  Which is correct for a k8 Opteron 248?

Also, FWIW:

1) The march=native version that uses prefetcht0 is very repeatably
faster by about 15% in the particular test case I'm looking at.

2) The compilers in both instances are not just the same version, they
are the same compiler binary installed on an NFS mount and shared to both
computers.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-16 16:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-01 20:25 option -mprfchw on 2 different Opteron cpus NightStrike
2016-05-02  9:55 ` Kumar, Venkataramanan
2016-05-02 17:01   ` NightStrike
2016-05-03  4:40     ` Kumar, Venkataramanan
2016-08-16 16:43       ` NightStrike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).