public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113822] New: aarch64_evpc_reencode could/should use new_shrunk_vector instead of manually doing it
@ 2024-02-08  3:18 pinskia at gcc dot gnu.org
  2024-02-12 23:56 ` [Bug target/113822] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-08  3:18 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-28  0:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-08  3:18 [Bug target/113822] New: aarch64_evpc_reencode could/should use new_shrunk_vector instead of manually doing it pinskia at gcc dot gnu.org
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

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).