https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124142
--- Comment #7 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
So I have a patch to fix this, but hitting a latent bug where rejecting
vectorization seems to still modify the scalar code leading to a miscompile.
long long a[1024];
float b[1024];
float c;
void abort();
int main() {
int d;
volatile float e;
volatile double h, i, f, g = 1.0f;
for (; c == e;)
for (; (i = f) == g;)
;
for (d = 0; d < 4; d++)
if (d == 0)
b[d] = h;
for (d = 0; d < 1024; d++)
if (a[d] != (__typeof(0))b[d])
abort();
}
this gets incorrect codegen when we reject vectorization during analysis.
Figuring out where this happens.