https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115466
Kewen Lin <linkw at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |linkw at gcc dot gnu.org --- Comment #2 from Kewen Lin <linkw at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #1) > > int ia[8] = {1, 2, 3, 4, 5, 6, 7, 8}; > > float fa[8] = {10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0}; > > The way vec_ld works is is (a+b)&~0xf is the address which is being loaded. > > Both ia and fa are not specified as being aligned to the 16byte boundary so > it could be loading from before hand. > > What happens if you do: > int ia[8] __attribute__((aligned(16))) = {1, 2, 3, 4, 5, 6, 7, 8}; > float fa[8] __attribute__((aligned(16))) = {10.0, 20.0, 30.0, 40.0, 50.0, > 60.0, 70.0, 80.0}; > > Instead? Good point, I can't reproduce the reported issue on two LE machines, so I'd leave Carl to confirm. But from the output (biasing two elements from the expected), I believe this is the root cause.