public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/114577] New: Inefficient codegen for SVE/NEON bridge
@ 2024-04-03 19:27 tnfchris at gcc dot gnu.org
  2024-04-04 13:17 ` [Bug target/114577] " cvs-commit at gcc dot gnu.org
  2024-04-04 13:18 ` rsandifo at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2024-04-03 19:27 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114577
           Summary: Inefficient codegen for SVE/NEON bridge
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tnfchris at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64*

The following sequence:

#include <arm_neon_sve_bridge.h>

svint32_t f (int *a, int *b)
{
  int32x4_t va = vld1q_s32 (a);
  svint32_t za = svset_neonq_s32 (svundef_s32 (), va);
  return za;
}

-O2 -march=armv9-a

is expected to be a simple load but generates:

f:
        ldr     q31, [x0]
        ptrue   p3.s, vl4
        sel     z0.s, p3, z31.s, z0.s
        ret

instead of the expected (from clang):

f:                                      // @f
        ldr     q0, [x0]
        ret

it looks like GCC's implementation of svset_neonq_s32 with svundef does not
become a view_convert/subreg.

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

end of thread, other threads:[~2024-04-04 13:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-03 19:27 [Bug target/114577] New: Inefficient codegen for SVE/NEON bridge tnfchris at gcc dot gnu.org
2024-04-04 13:17 ` [Bug target/114577] " cvs-commit at gcc dot gnu.org
2024-04-04 13:18 ` rsandifo 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).