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/113458] Missed SLP for reduction of multiplication/addition with promotion
Date: Thu, 18 Jan 2024 08:10:08 +0000	[thread overview]
Message-ID: <bug-113458-4-CTlBsYEldj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113458-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Hongtao Liu from comment #2)
> > But if we reduce n to 4, the loop based vectorizer is not able to handle it
> > either.
> 
> Do we support 1 element vector(i.e V1SI) in vectorizer?

Yes, but I'm not sure we'd try it here.

For SVE with -msve-vector-bits=128 we fail to elide the load permutation
thoug it looks odd:

t.c:7:13: missed:   unsupported vect permute { 3 2 0 1 7 6 4 5 11 10 8 9 }
t.c:7:13: missed:   unsupported load permutation

the SLP tree is

t.c:7:13: note:   Final SLP tree for instance 0x45933a0:
t.c:7:13: note:   node 0x45b82a0 (max_nunits=4, refcnt=2) vector(4) int
t.c:7:13: note:   op template: patt_38 = _16 w* patt_36;
t.c:7:13: note:         stmt 0 patt_38 = _16 w* patt_36;
t.c:7:13: note:         stmt 1 patt_35 = _11 w* patt_33;
t.c:7:13: note:         stmt 2 patt_29 = _1 w* patt_27;
t.c:7:13: note:         stmt 3 patt_32 = _6 w* patt_30;
t.c:7:13: note:         children 0x45b8330 0x45b83c0
t.c:7:13: note:   node 0x45b8330 (max_nunits=4, refcnt=2) vector(4) short int
t.c:7:13: note:   op template: _16 = MEM[(short int *)a_22(D) + 6B];
t.c:7:13: note:         stmt 0 _16 = MEM[(short int *)a_22(D) + 6B];
t.c:7:13: note:         stmt 1 _11 = MEM[(short int *)a_22(D) + 4B];
t.c:7:13: note:         stmt 2 _1 = *a_22(D);
t.c:7:13: note:         stmt 3 _6 = MEM[(short int *)a_22(D) + 2B];
t.c:7:13: note:         load permutation { 3 2 0 1 }
t.c:7:13: note:   node 0x45b83c0 (max_nunits=4, refcnt=2) vector(4) signed
short
t.c:7:13: note:   op template: patt_36 = (signed short) _18;
t.c:7:13: note:         stmt 0 patt_36 = (signed short) _18;
t.c:7:13: note:         stmt 1 patt_33 = (signed short) _13;
t.c:7:13: note:         stmt 2 patt_27 = (signed short) _3;
t.c:7:13: note:         stmt 3 patt_30 = (signed short) _8;
t.c:7:13: note:         children 0x45b8450
t.c:7:13: note:   node 0x45b8450 (max_nunits=4, refcnt=2) vector(4) signed char
t.c:7:13: note:   op template: _18 = MEM[(signed char *)b_23(D) + 3B];
t.c:7:13: note:         stmt 0 _18 = MEM[(signed char *)b_23(D) + 3B];
t.c:7:13: note:         stmt 1 _13 = MEM[(signed char *)b_23(D) + 2B];
t.c:7:13: note:         stmt 2 _3 = *b_23(D);
t.c:7:13: note:         stmt 3 _8 = MEM[(signed char *)b_23(D) + 1B];
t.c:7:13: note:         load permutation { 3 2 0 1 }

it looks like NEON doesn't have integer vectors(!?)

  parent reply	other threads:[~2024-01-18  8:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17 20:29 [Bug tree-optimization/113458] New: " pinskia at gcc dot gnu.org
2024-01-17 21:08 ` [Bug tree-optimization/113458] " pinskia at gcc dot gnu.org
2024-01-18  5:13 ` liuhongt at gcc dot gnu.org
2024-01-18  8:05 ` rguenth at gcc dot gnu.org
2024-01-18  8:10 ` rguenth at gcc dot gnu.org [this message]
2024-01-18  8:36 ` [Bug target/113458] " pinskia at gcc dot gnu.org
2024-01-19  0:33 ` liuhongt at gcc dot gnu.org
2024-01-19 21:41 ` pinskia at gcc dot gnu.org
2024-01-19 22:56 ` pinskia at gcc dot gnu.org
2024-01-20  0:41 ` pinskia at gcc dot gnu.org
2024-01-20  8:09 ` pinskia at gcc dot gnu.org
2024-01-21 22:14 ` pinskia 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-113458-4-CTlBsYEldj@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).