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/113822] New: aarch64_evpc_reencode could/should use new_shrunk_vector instead of manually doing it
Date: Thu, 08 Feb 2024 03:18:19 +0000	[thread overview]
Message-ID: <bug-113822-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 113822
           Summary: aarch64_evpc_reencode could/should use
                    new_shrunk_vector instead of manually doing it
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: internal-improvement
          Severity: enhancement
          Priority: P3
         Component: target
          Assignee: pinskia at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64

The current code does:
```
  /* Convert the perm constant if we can.  Require even, odd as the pairs.  */
  for (unsigned int i = 0; i < nelt; i += 2)
    {
      poly_int64 elt0 = d->perm[i];
      poly_int64 elt1 = d->perm[i + 1];
      poly_int64 newelt;
      if (!multiple_p (elt0, 2, &newelt) || maybe_ne (elt0 + 1, elt1))
        return false;
      newpermconst.quick_push (newelt.to_constant ());
    }
  newpermconst.finalize ();
```

But that is just:
```
vec_perm_indices newpermindices;
if (!newpermindices.new_shrunk_vector(d->perm, 2))
  return false;
...
newd.perm.new_vector (newpermindices.encoding (), d.one_vector_p ? 1 : 2,
                      newpermindices.nelts_per_input ());
```

Filing so I remember to make this change.  Note I noticed this while
implementing V2HI/V4QI support.

             reply	other threads:[~2024-02-08  3:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08  3:18 pinskia at gcc dot gnu.org [this message]
2024-02-12 23:56 ` [Bug target/113822] " pinskia at gcc dot gnu.org
2024-02-13  5:16 ` pinskia at gcc dot gnu.org
2024-04-28  0:15 ` cvs-commit at gcc dot gnu.org
2024-04-28  0:15 ` 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-113822-4@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).