public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/112853] RISC-V: RVV: SPEC2017 525.x264 regression
Date: Mon, 11 Dec 2023 09:47:03 +0000	[thread overview]
Message-ID: <bug-112853-4-gy65AfGfPW@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112853-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Robin Dapp <rdapp@gcc.gnu.org>:

https://gcc.gnu.org/g:d9dd06ad51b7479f09acb88adf404664a1e18b2a

commit r14-6404-gd9dd06ad51b7479f09acb88adf404664a1e18b2a
Author: Robin Dapp <rdapp@ventanamicro.com>
Date:   Fri Dec 8 12:50:01 2023 +0100

    RISC-V: Recognize stepped series in expand_vec_perm_const.

    We currently try to recognize various forms of stepped (const_vector)
    sequence variants in expand_const_vector.  Because of complications with
    canonicalization and encoding it is easier to identify such patterns
    in expand_vec_perm_const_1 already where perm.series_p () is available.

    This patch introduces shuffle_series as new permutation pattern and
    tries to recognize series like [base0 base1 base1 + step ...].  If such
    a series is found the series is expanded by expand_vec_series and a
    gather is emitted.

    On top the patch fixes the step recognition in expand_const_vector
    for stepped series where such a series would end up before.

    This fixes several execution failures when running code compiled for a
    scalable vector size of 128 on a target with vlen = 256 or higher.
    The problem was only noticed there because the encoding for a reversed
    [2 2]-element vector ("3 2 1 0") is { [1 2], [0 2], [1 4] }.

    Some testcases that failed were:
    vect-alias-check-18.c
    vect-alias-check-1.F90
    pr64365.c

    On a 128-bit target, only the first two elements are used.  The
    third element causing the complications only comes into effect at
    vlen = 256.

    With this patch the testsuite results are similar with vlen = 128,
    vlen = 256 as well as vlen = 512 (apart from the fixed-vlmax tests of
    course).

    gcc/ChangeLog:

            PR target/112853

            * config/riscv/riscv-v.cc (expand_const_vector):  Fix step
            calculation.
            (modulo_sel_indices): Also perform modulo for variable-length
            constants.
            (shuffle_series): Recognize series permutations.
            (expand_vec_perm_const_1): Add shuffle_series.

  parent reply	other threads:[~2023-12-11  9:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05  0:12 [Bug target/112853] New: " vineetg at gcc dot gnu.org
2023-12-05  0:14 ` [Bug target/112853] " vineetg at gcc dot gnu.org
2023-12-05  1:12 ` vineetg at gcc dot gnu.org
2023-12-05  6:51 ` juzhe.zhong at rivai dot ai
2023-12-05  7:43 ` juzhe.zhong at rivai dot ai
2023-12-05  8:30 ` rdapp at gcc dot gnu.org
2023-12-05 14:39 ` rdapp at gcc dot gnu.org
2023-12-05 14:42 ` rdapp at gcc dot gnu.org
2023-12-06 10:19 ` rdapp at gcc dot gnu.org
2023-12-11  9:47 ` cvs-commit at gcc dot gnu.org [this message]
2023-12-11  9:48 ` rdapp 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-112853-4-gy65AfGfPW@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).