public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "michael.v.zolotukhin at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/56624] New: Vectorizer gives up on a group-access if it contains stores to the same location
Date: Fri, 15 Mar 2013 11:51:00 -0000	[thread overview]
Message-ID: <bug-56624-4@http.gcc.gnu.org/bugzilla/> (raw)


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

             Bug #: 56624
           Summary: Vectorizer gives up on a group-access if it contains
                    stores to the same location
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: michael.v.zolotukhin@gmail.com
             Build: 4.8.0 20130313


Created attachment 29672
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29672
Reproducer

GCC can't vectorize such loop:
void foo (double *a)
{
  int i;
  for (i = 0; i < 100; i+=2)
    {
      a[i+1] = 2;
      a[i] = 3;
      a[i+1] = 2;
      a[i] = 3;
    }
}
Vectorizer reports following:

note: === vect_analyze_data_ref_accesses === 
note: Detected interleaving of size 2 
note: Two store stmts share the same dr. 
note: not vectorized: complicated access pattern.

Obviously, in this given case vectorization is possible because the first
stores have no effect.

This test is a reproducer of similar problem encountered on Spec2006/470.lbm -
there if-conversion could produce stores to the same location which will stop
vectorizer.

The test is attached, command line to reproduce:
gcc group_access.c -O3 -c -ftree-vectorizer-verbose=15


             reply	other threads:[~2013-03-15 11:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15 11:51 michael.v.zolotukhin at gmail dot com [this message]
2013-03-15 11:55 ` [Bug tree-optimization/56624] " rguenth at gcc dot gnu.org
2013-03-15 12:20 ` michael.v.zolotukhin at gmail dot com
2013-03-15 12:27 ` michael.v.zolotukhin at gmail dot com
2013-03-15 12:28 ` michael.v.zolotukhin at gmail dot com
2013-03-15 12:32 ` rguenth at gcc dot gnu.org
2020-09-14 12:44 ` rguenth at gcc dot gnu.org
2024-03-10  5:22 ` pinskia at gcc dot gnu.org
2024-03-10  5:25 ` pinskia 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-56624-4@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).