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/96339] [SVE] Optimise svlast[ab]
Date: Tue, 13 Jun 2023 07:04:22 +0000	[thread overview]
Message-ID: <bug-96339-4-ZazYGS8ctV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96339-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tejas Belagod <belagod@gcc.gnu.org>:

https://gcc.gnu.org/g:22d85c10a004f4f5eaf6b68b62a0792faf048bf8

commit r14-1744-g22d85c10a004f4f5eaf6b68b62a0792faf048bf8
Author: Tejas Belagod <tbelagod@arm.com>
Date:   Tue May 11 11:09:03 2021 +0100

    AArch64: [PR96339] Optimise svlast[ab]

      This PR optimizes an SVE intrinsics sequence where
        svlasta (svptrue_pat_b8 (SV_VL1), x)
      a scalar is selected based on a constant predicate and a variable vector.
      This sequence is optimized to return the correspoding element of a NEON
      vector. For eg.
        svlasta (svptrue_pat_b8 (SV_VL1), x)
      returns
        umov    w0, v0.b[1]
      Likewise,
        svlastb (svptrue_pat_b8 (SV_VL1), x)
      returns
         umov    w0, v0.b[0]
      This optimization only works provided the constant predicate maps to a
range
      that is within the bounds of a 128-bit NEON register.

    gcc/ChangeLog:

            PR target/96339
            * config/aarch64/aarch64-sve-builtins-base.cc (svlast_impl::fold):
Fold sve
            calls that have a constant input predicate vector.
            (svlast_impl::is_lasta): Query to check if intrinsic is svlasta.
            (svlast_impl::is_lastb): Query to check if intrinsic is svlastb.
            (svlast_impl::vect_all_same): Check if all vector elements are
equal.

    gcc/testsuite/ChangeLog:

            PR target/96339
            * gcc.target/aarch64/sve/acle/general-c/svlast.c: New.
            * gcc.target/aarch64/sve/acle/general-c/svlast128_run.c: New.
            * gcc.target/aarch64/sve/acle/general-c/svlast256_run.c: New.
            * gcc.target/aarch64/sve/pcs/return_4.c (caller_bf16): Fix asm
            to expect optimized code for function body.
            * gcc.target/aarch64/sve/pcs/return_4_128.c (caller_bf16):
Likewise.
            * gcc.target/aarch64/sve/pcs/return_4_256.c (caller_bf16):
Likewise.
            * gcc.target/aarch64/sve/pcs/return_4_512.c (caller_bf16):
Likewise.
            * gcc.target/aarch64/sve/pcs/return_4_1024.c (caller_bf16):
Likewise.
            * gcc.target/aarch64/sve/pcs/return_4_2048.c (caller_bf16):
Likewise.
            * gcc.target/aarch64/sve/pcs/return_5.c (caller_bf16): Likewise.
            * gcc.target/aarch64/sve/pcs/return_5_128.c (caller_bf16):
Likewise.
            * gcc.target/aarch64/sve/pcs/return_5_256.c (caller_bf16):
Likewise.
            * gcc.target/aarch64/sve/pcs/return_5_512.c (caller_bf16):
Likewise.
            * gcc.target/aarch64/sve/pcs/return_5_1024.c (caller_bf16):
Likewise.
            * gcc.target/aarch64/sve/pcs/return_5_2048.c (caller_bf16):
Likewise.

  parent reply	other threads:[~2023-06-13  7:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27 16:22 [Bug target/96339] New: " rsandifo at gcc dot gnu.org
2021-04-14 13:14 ` [Bug target/96339] " belagod at gcc dot gnu.org
2021-04-15 10:57 ` belagod at gcc dot gnu.org
2021-10-06 11:51 ` prathamesh3492 at gcc dot gnu.org
2021-10-07 11:24 ` belagod at gcc dot gnu.org
2021-10-07 11:26 ` prathamesh3492 at gcc dot gnu.org
2022-05-06  8:30 ` jakub at gcc dot gnu.org
2023-05-08 12:21 ` rguenth at gcc dot gnu.org
2023-06-13  7:04 ` cvs-commit at gcc dot gnu.org [this message]
2023-06-13  7:07 ` belagod 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-96339-4-ZazYGS8ctV@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).