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/115304] gcc.dg/vect/slp-gap-1.c FAILs
Date: Fri, 31 May 2024 12:26:18 +0000	[thread overview]
Message-ID: <bug-115304-4-VrrbENDGcA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-115304-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |testsuite-fail

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
It should only need vect32 - basically I assumed the target can compose the
64bit vector from two 32bit elements.  But it might be that for this to work
the loads would need to be aligned.

What is needed is char-to-short unpacking and vector composition.  Either
composing V2SImode or V8QImode from two V4QImode vectors.

Does the following help?

diff --git a/gcc/testsuite/gcc.dg/vect/slp-gap-1.c
b/gcc/testsuite/gcc.dg/vect/slp-gap-1.c
index 36463ca22c5..08942380caa 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-gap-1.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-gap-1.c
@@ -4,6 +4,9 @@
 typedef unsigned char uint8_t;
 typedef short int16_t;
 void pixel_sub_wxh(int16_t * __restrict diff, uint8_t *pix1, uint8_t *pix2) {
+  diff = __builtin_assume_aligned (diff, __BIGGEST_ALIGNMENT__);
+  pix1 = __builtin_assume_aligned (pix1, 4);
+  pix2 = __builtin_assume_aligned (pix2, 4);
   for (int y = 0; y < 4; y++) {
     for (int x = 0; x < 4; x++)
       diff[x + y * 4] = pix1[x] - pix2[x];

  parent reply	other threads:[~2024-05-31 12:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31  8:45 [Bug tree-optimization/115304] New: " ro at gcc dot gnu.org
2024-05-31  8:46 ` [Bug tree-optimization/115304] " ro at gcc dot gnu.org
2024-05-31  8:46 ` ro at gcc dot gnu.org
2024-05-31 12:26 ` rguenth at gcc dot gnu.org [this message]
2024-06-03  9:18 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-06-03 10:10 ` tschwinge at gcc dot gnu.org
2024-06-03 10:10 ` tschwinge at gcc dot gnu.org
2024-06-03 10:13 ` tschwinge at gcc dot gnu.org
2024-06-03 12:43 ` rguenth at gcc dot gnu.org
2024-06-03 12:46 ` cvs-commit at gcc dot gnu.org
2024-06-03 12:47 ` rguenth at gcc dot gnu.org
2024-06-03 13:33 ` ams at gcc dot gnu.org
2024-06-03 13:51 ` rguenther at suse dot de
2024-06-03 14:11 ` ams at gcc dot gnu.org
2024-06-20  5:15 ` pinskia at gcc dot gnu.org
2024-06-20  6:45 ` rguenther at suse dot de

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-115304-4-VrrbENDGcA@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).