gcc.target/ppc-vector-memcpy.c testcase currently fails and has been failing since early in the GCC 4.6 development cycle. A change by Eric Botcazou in April 2008 to the handling of constants reduced the extra alignment of initializers matching the alignment of the variable.
The testcases originally was written by Geoff Keating and I do not know exactly what features he was trying to test -- if he only was testing Altivec used for block move or also Altivec used for aligned initializers. The appended patch changes the testcase to match the name of the file: test that aligned memcpy uses VMX. Any contrary opinion about this change? Thanks, David * gcc.target/powerpc/ppc-vector-memcpy.c: Test use of VMX for memcpy not initializers. Index: ppc-vector-memcpy.c =================================================================== --- ppc-vector-memcpy.c (revision 201200) +++ ppc-vector-memcpy.c (working copy) @@ -3,8 +3,13 @@ /* { dg-options "-O -maltivec -mno-vsx" } */ /* { dg-final { scan-assembler "lvx" } } */ +#include <string.h> + void foo(void) { - int x[8] __attribute__((aligned(128))) = { 1, 1, 1, 1, 1, 1, 1, 1 }; - bar (x); + extern int x[8] __attribute__((aligned(128))); + int y[8] __attribute__((aligned(128))); + memcpy (y, x, sizeof (x)); + bar (y); }