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

            Bug ID: 113858
           Summary: `ldr s0/h0/b0` should be used to zero extend into the
                    full register
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64-*-*

Take:
```
A couple more:
```
#define vect128 __attribute__((vector_size(16) ))
#define vect64 __attribute__((vector_size(8) ))


vect64  int i64l( int *a)
{
  return (vect64 int){*a, 0};
}
vect64  short s64l( short  *a)
{
  return (vect64 short ){*a, 0};
}

vect128  int i128l( int *a)
{
  return (vect128 int){*a, 0};
}
vect64  unsigned char c64l( unsigned char *a)
{
  return (vect64 unsigned char){*a, 0};
}

```

Currently only i64l is implemented using `ldr s0` but the rest could be
implemented similarly.

Note LLVM is able to optimize this which is why I filed this seperately from PR
113857 .

Reply via email to