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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |101926

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Marc Glisse from comment #3)
> Note that we do not generate better code for
> typedef float vec __attribute__((vector_size(8)));
> vec g(vec x){return 2*x;}
> (we don't consider larger vector modes when lowering/expanding vector
> operations, there is already a PR about that)

The testcase in comment #3 was fixed for GCC 11+.
The original testcase still has issues has SLP does not happen but then we are
to another problem.
See:
#define complex _Complex
typedef float vec __attribute__((vector_size(8)));

complex float f(complex float x) {
  vec t = *(vec*)&x;
  t= (2*t);
  return *(complex float*)&t;
}

Note I think there is a dup for the above issue too.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101926
[Bug 101926] [meta-bug] struct/complex argument passing and return should be
improved

Reply via email to