public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/45902] CPU2006 benchmark sphinx3 fails with vectorization
Date: Sun, 10 Oct 2010 13:27:00 -0000 [thread overview]
Message-ID: <20101010132700.Uh-_KxUbfuNLgbsHhzbvuWkYSIMhgsFzuuYzA2D8-_M@z> (raw)
In-Reply-To: <bug-45902-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45902
--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-10 13:26:39 UTC ---
(In reply to comment #8)
> The problem is in creation of constant operands for SLP, and is caused by my
> patch r155882, which takes the type for the constant from the constant itself.
> This was needed for pointers, but is bad for other cases, like shift of shorts
> that is treated as int here, causing wrong code generation.
>
> I am going to test this patch now:
>
> Index: tree-vect-slp.c
> ===================================================================
> --- tree-vect-slp.c (revision 164987)
> +++ tree-vect-slp.c (working copy)
> @@ -1894,13 +1894,20 @@ vect_get_constant_vectors (slp_tree slp_
> }
>
> if (CONSTANT_CLASS_P (op))
> - constant_p = true;
> + {
> + constant_p = true;
> + if (POINTER_TYPE_P (TREE_TYPE (gimple_assign_lhs (stmt))))
> + vector_type = get_vectype_for_scalar_type (TREE_TYPE (op));
> + else
> + vector_type = STMT_VINFO_VECTYPE (stmt_vinfo);
> + }
> else
> - constant_p = false;
> + {
> + constant_p = false;
> + vector_type = get_vectype_for_scalar_type (TREE_TYPE (op));
> + }
>
> - vector_type = get_vectype_for_scalar_type (TREE_TYPE (op));
> gcc_assert (vector_type);
> -
> nunits = TYPE_VECTOR_SUBPARTS (vector_type);
>
> /* NUMBER_OF_COPIES is the number of times we need to use the same values in
I certainly would prefer unconditional use of STMT_VINFO_VECTYPE (stmt_vinfo).
Why should that not work?
next prev parent reply other threads:[~2010-10-10 13:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-05 21:32 [Bug tree-optimization/45902] New: " pthaugen at gcc dot gnu.org
2010-10-05 21:39 ` [Bug tree-optimization/45902] " pthaugen at gcc dot gnu.org
2010-10-06 0:38 ` hjl.tools at gmail dot com
2010-10-06 2:29 ` pthaugen at gcc dot gnu.org
2010-10-07 13:08 ` irar at il dot ibm.com
2010-10-07 17:57 ` pthaugen at gcc dot gnu.org
2010-10-07 18:42 ` pthaugen at gcc dot gnu.org
2010-10-08 9:44 ` rguenth at gcc dot gnu.org
2010-10-10 8:59 ` irar at il dot ibm.com
2010-10-10 12:48 ` irar at il dot ibm.com
2010-10-10 13:27 ` rguenth at gcc dot gnu.org [this message]
2010-10-10 15:06 ` irar at il dot ibm.com
2010-10-11 12:19 ` irar at gcc dot gnu.org
2010-11-02 12:13 ` irar at gcc dot gnu.org
2010-11-02 12:21 ` irar at il dot ibm.com
2010-11-09 19:09 ` spop at gcc dot gnu.org
2010-11-09 19:18 ` spop 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=20101010132700.Uh-_KxUbfuNLgbsHhzbvuWkYSIMhgsFzuuYzA2D8-_M@z \
--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).