public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vincenzo.innocente at cern dot ch" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/49483] unable to vectorize code equivalent to "scalbnf"
Date: Tue, 21 Jun 2011 10:42:00 -0000 [thread overview]
Message-ID: <bug-49483-4-TOL18sLBFU@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-49483-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49483
--- Comment #2 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-06-21 10:42:01 UTC ---
great!
unfortunately
gcc-4.7-20110528 $ patch -p0 < vect.patch
patching file gcc/tree-vect-stmts.c
Hunk #1 FAILED at 2089.
Hunk #2 FAILED at 2099.
Hunk #3 FAILED at 2134.
3 out of 3 hunks FAILED -- saving rejects to file gcc/tree-vect-stmts.c.rej
so I edit gcc/tree-vect-stmts.c by hand
and worked!
vldexpf.cc:16: note: LOOP VECTORIZED.
hope it will make it for 4.6.1 :-)
I'm will wait that it gets in a snapshot to update all my machines to a new
version.
v.
On 21 Jun, 2011, at 11:26 AM, rguenth at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49483
>
> Richard Guenther <rguenth at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|UNCONFIRMED |ASSIGNED
> Last reconfirmed| |2011.06.21 09:26:57
> AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
> |gnu.org |
> Ever Confirmed|0 |1
>
> --- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-21 09:26:57 UTC ---
> We at the moment only handle sign-changes, but obviously
> we in principle can handle all VIEW_CONVERT_EXPRs.
>
> I'm testing the following, which works for your testcase.
>
> Index: gcc/tree-vect-stmts.c
> ===================================================================
> --- gcc/tree-vect-stmts.c (revision 175205)
> +++ gcc/tree-vect-stmts.c (working copy)
> @@ -2089,6 +2089,9 @@ vectorizable_assignment (gimple stmt, gi
> else
> return false;
>
> + if (code == VIEW_CONVERT_EXPR)
> + op = TREE_OPERAND (op, 0);
> +
> if (!vect_is_simple_use_1 (op, loop_vinfo, bb_vinfo,
> &def_stmt, &def, &dt[0], &vectype_in))
> {
> @@ -2099,7 +2102,8 @@ vectorizable_assignment (gimple stmt, gi
>
> /* We can handle NOP_EXPR conversions that do not change the number
> of elements or the vector size. */
> - if (CONVERT_EXPR_CODE_P (code)
> + if ((CONVERT_EXPR_CODE_P (code)
> + || code == VIEW_CONVERT_EXPR)
> && (!vectype_in
> || TYPE_VECTOR_SUBPARTS (vectype_in) != nunits
> || (GET_MODE_SIZE (TYPE_MODE (vectype))
> @@ -2134,7 +2138,8 @@ vectorizable_assignment (gimple stmt, gi
> /* Arguments are ready. create the new vector stmt. */
> FOR_EACH_VEC_ELT (tree, vec_oprnds, i, vop)
> {
> - if (CONVERT_EXPR_CODE_P (code))
> + if (CONVERT_EXPR_CODE_P (code)
> + || code == VIEW_CONVERT_EXPR)
> vop = build1 (VIEW_CONVERT_EXPR, vectype, vop);
> new_stmt = gimple_build_assign (vec_dest, vop);
> new_temp = make_ssa_name (vec_dest, new_stmt);
>
> --
> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.
--
Il est bon de suivre sa pente, pourvu que ce soit en montant.
A.G.
http://www.flickr.com/photos/vin60/1320965757/
next prev parent reply other threads:[~2011-06-21 10:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-21 9:04 [Bug tree-optimization/49483] New: " vincenzo.innocente at cern dot ch
2011-06-21 9:27 ` [Bug tree-optimization/49483] " rguenth at gcc dot gnu.org
2011-06-21 10:42 ` vincenzo.innocente at cern dot ch [this message]
2011-06-21 10:51 ` rguenther at suse dot de
2011-06-21 11:03 ` rguenth at gcc dot gnu.org
2011-06-21 11:04 ` rguenth 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-49483-4-TOL18sLBFU@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).