public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "changpeng dot fang at amd dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/45021] New: Redundant prefetches for the vectorized loop Date: Wed, 21 Jul 2010 17:46:00 -0000 [thread overview] Message-ID: <bug-45021-18740@http.gcc.gnu.org/bugzilla/> (raw) For the following test case, prefetches will be inserted for both the load and store of a[i] if the loop is vectorized: float a[1024], b[1024]; void foo(int beta) { int i; for(i=0; i<1024; i++) a[i] = a[i] + beta * b[i]; } with gcc -O3 -fprefetch-loop-arrays -march=amdfam10 -S, a piece of the assembly is: movaps (%rcx), %xmm0 addl $4, %edi prefetcht0 (%rdx) prefetcht0 240(%rcx) prefetchw (%rdx) leaq 64(%rax), %rsi mulps %xmm1, %xmm0 If we don't vectorize the loop, we only generate prefetch for the load a[i]: addl $16, %eax salq $2, %rcx mulss %xmm1, %xmm0 prefetcht0 a+92(%rcx) prefetcht0 b+92(%rcx) movl %esi, %ecx -- Summary: Redundant prefetches for the vectorized loop Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: changpeng dot fang at amd dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45021
next reply other threads:[~2010-07-21 17:46 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-07-21 17:46 changpeng dot fang at amd dot com [this message] 2010-07-21 18:27 ` [Bug tree-optimization/45021] " changpeng dot fang at amd dot com 2010-07-24 20:32 ` [Bug tree-optimization/45021] Redundant prefetches for some loops (vectorizer produced ones too) pinskia at gcc dot gnu dot org 2010-07-24 20:42 ` rakdver at kam dot mff dot cuni dot cz 2010-07-28 18:23 ` changpeng dot fang at amd dot com 2010-07-28 18:28 ` changpeng dot fang at amd dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-45021-18740@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).