public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "liuhongt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/112325] Missed vectorization of reduction after unrolling
Date: Thu, 16 Nov 2023 08:15:21 +0000 [thread overview]
Message-ID: <bug-112325-4-FPOePSZYZ1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112325-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112325
--- Comment #4 from liuhongt at gcc dot gnu.org ---
(In reply to liuhongt from comment #3)
> BB vectorizer relies on the backend support of .REDUC_PLUS for reduction,
> but loop vectorizer can manually do reduction. That's why it's not
> vectorized after cunrolli.
>
> After adding reduc_plus_scal_v4si, it's vectorized.
> Looks like we need to support
> reduc_plus_scal_{v4si,v8si,v16si,v8hi,v16hi,v32hi}
> Similar for reduc_{and,ior,xor}_scal_m.
This one can be vectorized after support reduc_plus_scal_v4si, but the original
loop is still not vectorized, should be other issues.
int
foo (int* a)
{
int sum = 0;
sum += a[0];
sum += a[1];
sum += a[2];
sum += a[3];
return sum;
}
next prev parent reply other threads:[~2023-11-16 8:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 2:41 [Bug tree-optimization/112325] New: Missed vectorization after cunrolli wwwhhhyyy333 at gmail dot com
2023-11-01 2:46 ` [Bug tree-optimization/112325] " pinskia at gcc dot gnu.org
2023-11-02 9:51 ` [Bug tree-optimization/112325] Missed vectorization of reduction after unrolling rguenth at gcc dot gnu.org
2023-11-16 8:03 ` liuhongt at gcc dot gnu.org
2023-11-16 8:15 ` liuhongt at gcc dot gnu.org [this message]
2023-11-16 9:15 ` rguenth at gcc dot gnu.org
2023-11-17 6:19 ` pinskia at gcc dot gnu.org
2023-11-17 6:21 ` pinskia at gcc dot gnu.org
2023-11-20 2:52 ` cvs-commit at gcc dot gnu.org
2023-11-21 0:34 ` cvs-commit at gcc dot gnu.org
2024-02-27 6:02 ` liuhongt at gcc dot gnu.org
2024-02-27 6:13 ` liuhongt at gcc dot gnu.org
2024-02-27 7:26 ` liuhongt at gcc dot gnu.org
2024-02-27 7:53 ` rguenther at suse dot de
2024-02-27 7:58 ` rguenther at suse dot de
2024-02-28 7:26 ` liuhongt at gcc dot gnu.org
2024-02-28 8:23 ` rguenther at suse dot de
2024-02-28 8:26 ` liuhongt 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-112325-4-FPOePSZYZ1@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).