[Bug target/105219] [12 Regression] SVE: Wrong code with -O3 -msve-vector-bits=128 -mtune=thunderx
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Apr 20 07:07:33 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105219
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|aarch64 |aarch64, x86_64-*-*
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
int data[128];
void __attribute((noipa))
foo (int *data, int n)
{
for (int i = 0; i < n; ++i)
data[i] = i;
}
int main()
{
for (int start = 0; start < 16; ++start)
for (int n = 1; n < 3*16; ++n)
{
__builtin_memset (data, 0, sizeof (data));
foo (&data[start], n);
for (int j = 0; j < n; ++j)
if (data[start + j] != j)
__builtin_abort ();
}
return 0;
}
for example aborts with -O3 -mtune=intel -fno-vect-cost-model on x86_64,
the cost model disabling is necessary to have the epilogue vectorized.
Without a cost model we peel for the maximum number of aligned refs
but still use the target cost to decide whether peeling is worth at all.
More information about the Gcc-bugs
mailing list