public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/106081] missed vectorization
Date: Fri, 24 Jun 2022 16:14:49 +0000	[thread overview]
Message-ID: <bug-106081-4-cUU774sk15@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106081-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106081

--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
This is an attempt to vectorize by hand, but it seems we do not generate
vpmovsxwd for the vector short->double conversion

struct pixels
{
        short a __attribute__ ((vector_size(4*2)));
} *pixels;
struct dpixels
{
        double a __attribute__ ((vector_size(8*4)));
};
typedef double v4df __attribute__ ((vector_size (32)));

struct dpixels
test(double *k)
{
        struct dpixels results={};
        for (int u=0; u<10000;u++,k--)
        {
                results.a += *k*__builtin_convertvector (pixels[u].a, v4df);
        }
        return results;
}

clang seems to do right thing here.

  reply	other threads:[~2022-06-24 16:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 15:56 [Bug middle-end/106081] New: " hubicka at gcc dot gnu.org
2022-06-24 16:14 ` hubicka at gcc dot gnu.org [this message]
2022-06-26  8:08 ` [Bug middle-end/106081] " crazylht at gmail dot com
2022-06-27  9:01 ` marxin at gcc dot gnu.org
2022-06-27 10:38 ` rguenth at gcc dot gnu.org
2022-06-27 14:26 ` hubicka at gcc dot gnu.org
2022-10-24  0:14 ` pinskia at gcc dot gnu.org
2023-06-21 13:45 ` rguenth at gcc dot gnu.org
2023-06-27  7:49 ` rguenth at gcc dot gnu.org
2023-06-27  8:13 ` rguenth at gcc dot gnu.org
2023-06-27  9:10 ` rsandifo at gcc dot gnu.org
2023-06-28 12:15 ` hubicka at gcc dot gnu.org
2023-07-26  9:34 ` rguenth at gcc dot gnu.org
2023-07-26  9:35 ` rguenth at gcc dot gnu.org
2023-07-26 10:01 ` rsandifo at gcc dot gnu.org
2023-07-26 10:32 ` rguenth at gcc dot gnu.org
2023-07-26 10:52 ` rguenth at gcc dot gnu.org
2023-07-26 11:00 ` rsandifo at gcc dot gnu.org
2023-07-26 11:15 ` rsandifo at gcc dot gnu.org
2023-07-26 12:15 ` rguenther at suse dot de
2023-07-26 13:28 ` cvs-commit at gcc dot gnu.org
2023-07-26 13:28 ` 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-106081-4-cUU774sk15@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).