public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/98877] [AArch64] Inefficient code generated for tbl NEON intrinsics
Date: Thu, 29 Feb 2024 05:45:12 +0000	[thread overview]
Message-ID: <bug-98877-4-ajNYRWnbDh@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98877-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Tamar Christina from comment #9)
> While RA should be able to deal with this,
> shouldn't we also just lower TBLs in gimple?
> 
> This no reason why this can't be a VEC_PERM_EXPR which would also get the
> copies
> removed at the gimple level and allows us to optimize this to something else
> depending on the index.

Yes there is a reason, `out of range` values for VEC_PERM is undefined while
tbl is well defined  ( If an index is out of range for the table, the result
for that lookup is 0.).

For tbx, it is well defined also (If an index is out of range for the table,
the existing value in the vector element of the destination register is left
unchanged. ).

I think for VECTOR_CST we can fold it down to VEC_PERM_EXPR if there is no out
of bounds value though.

  parent reply	other threads:[~2024-02-29  5:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-29  6:51 [Bug target/98877] New: " spop at gcc dot gnu.org
2021-01-29  7:39 ` [Bug target/98877] " pinskia at gcc dot gnu.org
2021-01-29  7:40 ` pinskia at gcc dot gnu.org
2021-01-29  9:10 ` ktkachov at gcc dot gnu.org
2021-08-12  8:09 ` tnfchris at gcc dot gnu.org
2021-08-22  9:30 ` pinskia at gcc dot gnu.org
2021-08-22  9:30 ` pinskia at gcc dot gnu.org
2021-08-22 10:14 ` tnfchris at gcc dot gnu.org
2024-01-26  0:24 ` pinskia at gcc dot gnu.org
2024-02-27  8:34 ` pinskia at gcc dot gnu.org
2024-02-27 19:28 ` rsandifo at gcc dot gnu.org
2024-02-28  9:12 ` tnfchris at gcc dot gnu.org
2024-02-29  5:45 ` pinskia at gcc dot gnu.org [this message]
2024-02-29  7:26 ` tnfchris at gcc dot gnu.org
2024-02-29  7:27 ` tnfchris 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-98877-4-ajNYRWnbDh@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).