public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <richard.guenther@gmail.com>
To: Revital1 Eres <ERES@il.ibm.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Vectorizing invariant data-ref
Date: Sun, 19 Jul 2009 09:17:00 -0000	[thread overview]
Message-ID: <84fc9c000907190217q3ce34cf5u83f6e6c4d0870e14@mail.gmail.com> (raw)
In-Reply-To: <OFB016B94E.CE4F6DF7-ONC22575F8.001843DB-C22575F8.0022A6EE@il.ibm.com>

On Sun, Jul 19, 2009 at 8:18 AM, Revital1 Eres<ERES@il.ibm.com> wrote:
>
> Hello,
>
> The following snippet is from a f90 program which contains
> a loop that does not get vectorized.
>
> SUBROUTINE foo1(nx,ny,nz,arr2)
> USE globalvar_mod, ONLY : dyinv, xstart, xstop
>
> k=1
> do j=1,ny
>  do i=1,nx
>
>    arr1(i,j,k) = arr2(i,j,k  ) *dyinv
>
>  end do
> end do
> END SUBROUTINE foo1
>
> The vectorizer failure message is:
>
>        base_address: &dyinv
>        offset from base address: 0
>        constant offset from base address: 0
>        step: 0
>        aligned to: 128
>        base_object: dyinv
>        FAILED as dr address is invariant
>
> test41.f90:24: note: get vectype with 2 units of type real(kind=8)
> test41.f90:24: note: vectype: vector real(kind=8)
> test41.f90:24: note: not vectorized: unhandled data-ref
> test41.f90:24: note: bad data references.
> test41.f90:7: note: vectorized 0 loops in function.
>
> I am not familiar with f90 at all; seemingly dyinv is a regular
> variable but according to the message in the dump file
> it's a reference.
>
> One option to vectorize this loop is to extend the vectorizer's versioning
> for aliasing capability to version the loop also in this case.
> Other suggestions will be appreciated.

The testcase is from 459.GemsFDTD, right?  dyinv is a regular
global variable.  The issue is the global arrays arr1 and arr2 end
up pointing to anything even though the Fortran aliasing rules say
the do not.

We are working on this issue.

Thanks,
Richard.

> Thanks,
> Revital
>
>
> (See attached file: test41.f90.txt)

  reply	other threads:[~2009-07-19  9:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-19  6:18 Revital1 Eres
2009-07-19  9:17 ` Richard Guenther [this message]
2009-07-19  9:42   ` Revital1 Eres

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=84fc9c000907190217q3ce34cf5u83f6e6c4d0870e14@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=ERES@il.ibm.com \
    --cc=gcc@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).