public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "irar at il dot ibm dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/37194] [4.3/4.4 Regression] Autovectorization of small constant iteration loop degrades performance
Date: Mon, 05 Jan 2009 13:58:00 -0000	[thread overview]
Message-ID: <20090105135829.21352.qmail@sourceware.org> (raw)
In-Reply-To: <bug-37194-14936@http.gcc.gnu.org/bugzilla/>



------- Comment #8 from irar at il dot ibm dot com  2009-01-05 13:58 -------
To handle unknown alignment of data, the vectorizer creates a prolog loop to
peel a statically unknown number of scalar iterations (0<=n<VF). This loop is
followed by a vectorized loop (with the remaining, multiple of VF, number of
iterations), and an epilog scalar loop that completes the iterations that were
not executed (0<=n<VF).
Therefore, the created scalar loops have unknown number of iterations, which
prevents their unrolling (while the original scalar loop is unrolled).
Vectorizer cost model does not take possible unrolling into account. 

Another cost model problem is that the calculation of scalar outside cost for
this case is performed not for the original scalar version, but includes
run-time guards. Which seems to be wrong in case that the original loop bound
is known. I am going to submit a patch to fix that.

Ira


-- 


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


  parent reply	other threads:[~2009-01-05 13:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-21 19:23 [Bug tree-optimization/37194] New: Autovectorization of " pthaugen at gcc dot gnu dot org
2008-08-21 19:33 ` [Bug tree-optimization/37194] Autovectorization of small " pinskia at gcc dot gnu dot org
2008-08-22  9:54 ` rguenth at gcc dot gnu dot org
2008-08-22 13:33 ` dorit at gcc dot gnu dot org
2008-12-27  5:55 ` pinskia at gcc dot gnu dot org
2008-12-27  5:58 ` [Bug tree-optimization/37194] [4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
2008-12-29 21:58 ` rguenth at gcc dot gnu dot org
2008-12-30 14:58 ` irar at il dot ibm dot com
2009-01-05 13:58 ` irar at il dot ibm dot com [this message]
2009-01-08  8:00 ` irar at gcc dot gnu dot org
2009-01-08  9:23 ` jakub at gcc dot gnu dot org
2009-01-08  9:24 ` cnstar9988 at gmail dot com
2009-01-08  9:26 ` irar at il dot ibm dot com
2009-01-11  7:55 ` [Bug tree-optimization/37194] [4.3 " irar at gcc dot gnu dot org
2009-01-11  7:57 ` irar at il dot ibm dot com

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=20090105135829.21352.qmail@sourceware.org \
    --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).