public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/41881] Complete unrolling (inner) versus vectorization of reduction Date: Fri, 30 Oct 2009 22:20:00 -0000 [thread overview] Message-ID: <20091030222046.5666.qmail@sourceware.org> (raw) In-Reply-To: <bug-41881-3264@http.gcc.gnu.org/bugzilla/> ------- Comment #1 from rguenth at gcc dot gnu dot org 2009-10-30 22:20 ------- You could use -O2 -ftree-vectorize. Another pretty straight-forward way to write the operation is TYPE fun3(TYPE *x, TYPE *y, unsigned int n) { int i, j; TYPE dot = 0; for (i = 0; i < n / 8; i++) { dot += *(x++) * *(y++); dot += *(x++) * *(y++); dot += *(x++) * *(y++); dot += *(x++) * *(y++); dot += *(x++) * *(y++); dot += *(x++) * *(y++); dot += *(x++) * *(y++); dot += *(x++) * *(y++); } return dot; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41881
next prev parent reply other threads:[~2009-10-30 22:20 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-10-30 20:30 [Bug tree-optimization/41881] New: " drow at gcc dot gnu dot org 2009-10-30 22:20 ` rguenth at gcc dot gnu dot org [this message] 2009-10-30 22:21 ` [Bug tree-optimization/41881] " rguenth at gcc dot gnu dot org 2009-10-30 22:42 ` drow at gcc dot gnu dot org 2009-10-30 22:50 ` rguenth at gcc dot gnu dot org 2010-08-10 16:02 ` [Bug tree-optimization/41881] [4.5/4.6 regression] " drow at gcc dot gnu dot org 2010-08-11 9:29 ` rguenth at gcc dot gnu dot org 2010-08-11 10:24 ` irar at il dot ibm dot com 2010-08-30 15:51 ` rguenth at gcc dot gnu dot 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=20091030222046.5666.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: linkBe 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).