public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/45021] Redundant prefetches for some loops (vectorizer produced ones too)
Date: Sat, 24 Jul 2010 20:32:00 -0000	[thread overview]
Message-ID: <20100724203224.22203.qmail@sourceware.org> (raw)
In-Reply-To: <bug-45021-18740@http.gcc.gnu.org/bugzilla/>



------- Comment #2 from pinskia at gcc dot gnu dot org  2010-07-24 20:32 -------
(In reply to comment #1)
> The direct reason is that prefetching could not differentiate the base
> addresses
> of the vectorized load and store (of a[i]):
> *vect_pa.6_24
> *vect_pa.19_37

Here is a testcase which shows the same issue without the vectorizer (compile
-O2 -fprefetch-loop-arrays -march=amdfam10 -fno-tree-ccp -fno-tree-vrp
-fno-tree-dominator-opts):
float *f();
float aa[1024];
float bb[1024];
void foo(int beta)
{
  int i;
  float *a = aa, *a1 = aa, *b = bb;
  for(i=0; i<1024; i++)
{
     *a = *a1 + beta * *b;
a++; a1++; b++;
}
}


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |missed-optimization
   Last reconfirmed|0000-00-00 00:00:00         |2010-07-24 20:32:24
               date|                            |
            Summary|Redundant prefetches for the|Redundant prefetches for
                   |vectorized loop             |some loops (vectorizer
                   |                            |produced ones too)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45021


  parent reply	other threads:[~2010-07-24 20:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-21 17:46 [Bug tree-optimization/45021] New: Redundant prefetches for the vectorized loop changpeng dot fang at amd dot com
2010-07-21 18:27 ` [Bug tree-optimization/45021] " changpeng dot fang at amd dot com
2010-07-24 20:32 ` pinskia at gcc dot gnu dot org [this message]
2010-07-24 20:42 ` [Bug tree-optimization/45021] Redundant prefetches for some loops (vectorizer produced ones too) 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=20100724203224.22203.qmail@sourceware.org \
    --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: link
Be 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).