public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/50698] pretending to create versioning for alias when not required
Date: Mon, 17 Oct 2011 09:26:00 -0000	[thread overview]
Message-ID: <bug-50698-4-s1wDoqkrDM@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-50698-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from rguenther at suse dot de <rguenther at suse dot de> 2011-10-17 09:26:05 UTC ---
On Sat, 15 Oct 2011, vincenzo.innocente at cern dot ch wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50698
> 
> --- Comment #6 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-10-15 13:40:31 UTC ---
> I now moved to a more realistic case that can be reduced to this: 
> 
> void loop(float *  x, int n) {
>   for (int i=0;i!=n; ++i)
>     x[i]=x[i+n]+x[i+2*n];
> }
> 
> 
> and it creates aliases even if the memory region are clearly disjoint:
> (used gcc version 4.7.0 20111015 (experimental) (GCC) )
> keep here or open an other "enhancement request"?

The problem is that x[i] and x[i+n] may alias for n == 0.  So this
is a completely different issue - that we miss to account for the
fact that n is the loop bound for the induction variable i and that
because i is signed, n has to be >= 0.  Still we won't be able to
compute a meaningful distance vector, as it depends on n, thus
we have to version the loop anyway (the distance vector is n and 2 * n).

Thus I'd say open a separate enhancement request stating that we need
to handle non-constant distance vectors in a better way (do not hold
your breath).


      parent reply	other threads:[~2011-10-17  9:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-12  8:08 [Bug tree-optimization/50698] New: " vincenzo.innocente at cern dot ch
2011-10-12 11:32 ` [Bug tree-optimization/50698] " rguenth at gcc dot gnu.org
2011-10-12 14:41 ` rguenth at gcc dot gnu.org
2011-10-12 17:01 ` vincenzo.innocente at cern dot ch
2011-10-13  9:01 ` rguenth at gcc dot gnu.org
2011-10-13  9:01 ` rguenth at gcc dot gnu.org
2011-10-15 13:40 ` vincenzo.innocente at cern dot ch
2011-10-17  9:26 ` rguenther at suse dot de [this message]

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-50698-4-s1wDoqkrDM@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: 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).