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

            Bug ID: 113857
           Summary: fmov should be used to zero the upper bits of the
                    vector 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:
```
#define vect128 __attribute__((vector_size(16) ))
#define vect64 __attribute__((vector_size(8) ))

vect64  float f64( float a)
{
  return (vect64 float){a, 0};
}

vect128  float f128( float a)
{
  return (vect128 float){a, 0, 0, 0};
}
```

GCC produces fmov for f64 but does not for f128.


Note we could the same for:
```
vect64  short s64( short a)
{
  return (vect64 short){a, 0};
}

vect128  int i128( int a)
{
  return (vect128 int){a, 0};
}
```

Well s64 can only be done if f16 extensions are enabled.

Reply via email to