public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "irar at il dot ibm.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/51499] vectorizer missing simple case
Date: Mon, 12 Dec 2011 11:13:00 -0000	[thread overview]
Message-ID: <bug-51499-4-maxQeUMh64@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51499-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from Ira Rosen <irar at il dot ibm.com> 2011-12-12 11:03:59 UTC ---
(In reply to comment #6)

> While investigating pr51597, I have found that vectorized loops in programs as
> simple as
> 
> subroutine spmmult(x,b,ad)
> implicit none
> integer, parameter :: nxyz=1008315
> real(8),dimension(nxyz):: x,b,ad
> b = ad*x
> end subroutine spmmult               !=========================================
> 
> has always an additional non-vectorized loop,

This loop has a prologue loop for alignment purposes.

> L5:
>         movsd   -8(%rdi,%rax,8), %xmm0
>         mulsd   -8(%rdx,%rax,8), %xmm0
>         movsd   %xmm0, -8(%rsi,%rax,8)
>         addq    $1, %rax
>         cmpq    %rcx, %rax
>         jne     L5
> 
> even when the above loops are unrolled. How can the loop L5 be unrolled if it
> is only there for a "scalar epilogue"?

It can't be unrolled, since the alignment is unknown, so we don't know the
number of iterations of the prologue loop, and, therefore, we don't know the
number of iterations of the epilogue.


  parent reply	other threads:[~2011-12-12 11:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-10 18:39 [Bug tree-optimization/51499] New: " fb.programming at gmail dot com
2011-12-11  8:29 ` [Bug tree-optimization/51499] " irar at il dot ibm.com
2011-12-11  8:48 ` fb.programming at gmail dot com
2011-12-11  9:05 ` irar at il dot ibm.com
2011-12-11 12:13 ` fb.programming at gmail dot com
2011-12-11 13:39 ` irar at il dot ibm.com
2011-12-11 14:55 ` dominiq at lps dot ens.fr
2011-12-11 16:58 ` fb.programming at gmail dot com
2011-12-12 11:13 ` irar at il dot ibm.com [this message]
2011-12-12 11:23 ` irar at il dot ibm.com
2011-12-12 11:27 ` rguenth at gcc dot gnu.org
2011-12-12 12:21 ` irar at il dot ibm.com
2011-12-12 13:10 ` dominiq at lps dot ens.fr
2011-12-12 14:31 ` fb.programming at gmail dot com
2011-12-13 16:33 ` irar at il dot ibm.com
2021-08-07  5:19 ` [Bug tree-optimization/51499] -Ofast does not vectorize while -O3 does 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-51499-4-maxQeUMh64@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).