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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
            Summary|RA fails to allocate        |RA fails to allocate
                   |register when loop          |register when loop
                   |invariant lives across      |invariant lives across
                   |calls                       |calls and eh
     Ever confirmed|0                           |1
           Keywords|                            |ra
   Last reconfirmed|                            |2023-06-12

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase for both x86_64 and aarch64:
```
#define vec __attribute__((vector_size(4*sizeof(float))))
struct s1
{
 s1();
 ~s1();
};
void g();
void g(float);
void f(float a, float b, vec float **c, int n, int j)
{
        s1 t2;
        float t = a/b;
        vec float d = {t, t, t, t};
        for (int l = 0; l < j; l++)
        {
                vec float s = {};
                for(int i =0;i<n;i++)
                {
                        c[l][i]+=d;
                        s+=c[l][i];
                }
                float sum = s[0]+s[1]+s[2]+s[3];
                g(sum);
        }
        g();
}
```

Reply via email to