public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/65206] Vectorized version of loop is removed.
Date: Wed, 25 Feb 2015 15:08:00 -0000	[thread overview]
Message-ID: <bug-65206-4-aNY5ml4yda@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65206-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65206

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
We apply versioning for aliasing but compute it as always aliasing in some way,
thus the runtime check gets immediately folded and thus the vectorized loop
removed:

t.c:7:3: note: create runtime check for data references a1[i_16] and *_34
t.c:7:3: note: created 1 versioning for alias checks.
t.c:7:3: note: loop versioned for vectorization because of possible aliasing
...

but I see the alias runtime check nowhere.

The DRs are

(gdb) p debug_data_reference (dr_a.dr)
#(Data Ref: 
#  bb: 4 
#  stmt: _5 = a1[i_16];
#  ref: a1[i_16];
#  base_object: a1;
#  Access function 0: {0, +, 1}_1
#)
$17 = void
(gdb) p debug_data_reference (dr_b.dr)
#(Data Ref: 
#  bb: 4 
#  stmt: MASK_STORE (_34, 0B, _ifc__32, _9);
#  ref: *_34;
#  base_object: MEM[(float *)&a1];
#  Access function 0: {0B, +, 4}_1
#)

so maybe the code doing masked loads/stores updates the DRs in a way that
will later confuse runtime alias checking.  Or for some reason it doesn't
update it enough to make data-dependence analysis handle it.

Clearly this is a must-dependence (but with known distance), so sth
that data dependence analysis should handle and sth that the runtime
alias checking isn't handling.


  parent reply	other threads:[~2015-02-25 14:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25 14:50 [Bug tree-optimization/65206] New: " ysrumyan at gmail dot com
2015-02-25 14:55 ` [Bug tree-optimization/65206] " ysrumyan at gmail dot com
2015-02-25 15:08 ` rguenth at gcc dot gnu.org [this message]
2015-02-25 15:11 ` rguenth at gcc dot gnu.org
2015-02-25 15:30 ` rguenth at gcc dot gnu.org
2015-02-25 15:33 ` rguenth at gcc dot gnu.org
2015-02-26 12:15 ` rguenth at gcc dot gnu.org
2015-02-26 12:38 ` rguenth at gcc dot gnu.org
2021-09-08 11:08 ` rguenth at gcc dot gnu.org
2021-09-20  6:51 ` [Bug tree-optimization/65206] vectorized version of loop is removed, dependence analysis fails for *&a[i] vs a[j] cvs-commit at gcc dot gnu.org
2021-09-20  6:51 ` rguenth at gcc dot gnu.org
2022-03-29 12:57 ` rguenth at gcc dot gnu.org

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-65206-4-aNY5ml4yda@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).