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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The reason is before:
  VIEW_CONVERT_EXPR<long long intD.10[2]>(D.3978)[_2] = x_6(D);

and:
  VIEW_CONVERT_EXPR<long long intD.10[2]>(D.3983)[_2] = x_6(D);

Could not figure out was doing the same access. Fixing the bug in
ao_compare::compare_ao_refs allowed the access to be compared as the same.

You can see the same behavior with:
```
int c0;

typedef int v4si __attribute__((vector_size(4*sizeof(int))));

v4si a;
int f()
{
        return a[c0];
}
int g()
{
        return a[c0];
}
```

Even on x86_64 with `-O2 -fno-inline` where ICF can see both g and f are the
same function.

Reply via email to