diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr92080-9.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr92080-9.c | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr92080-9.c b/gcc/testsuite/gcc.target/i386/pr92080-9.c new file mode 100644 index 0000000..f44ab56 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr92080-9.c @@ -0,0 +1,81 @@ +/* { dg-do compile } */ +/* { dg-options "-march=x86-64-v4 -O2" } */ +/* { dg-final { scan-assembler-times "vpbroadcastd" 1 } } */ +/* { dg-final { scan-assembler-times "vmovdqa\[\\t \]+" 8 } } */ +/* { dg-final { scan-assembler-times "vmovdqa64\[\\t \]+" 3 } } */ +/* { dg-final { scan-assembler-times "vmovdqa32\[\\t \]+" 1 } } */ + +typedef int v4si __attribute__((vector_size(16))); +typedef long long int v2di __attribute__((vector_size(16))); +typedef long long v2di __attribute__((vector_size(16))); +typedef long long v4di __attribute__((vector_size(32))); +typedef long long v8di __attribute__((vector_size(64))); +typedef int v4si __attribute__((vector_size(16))); +typedef int v8si __attribute__((vector_size(32))); +typedef int v16si __attribute__((vector_size(64))); +typedef short v8hi __attribute__((vector_size(16))); +typedef short v16hi __attribute__((vector_size(32))); +typedef short v32hi __attribute__((vector_size(64))); +typedef char v16qi __attribute__((vector_size(16))); +typedef char v32qi __attribute__((vector_size(32))); +typedef char v64qi __attribute__((vector_size(64))); + +extern v16qi b1; +extern v8hi h1; +extern v4si s1; +extern v2di l1; +extern v32qi b2; +extern v16hi h2; +extern v8si s2; +extern v4di l2; +extern v64qi b3; +extern v32hi h3; +extern v16si s3; +extern v8di l3; + +void +foo(void) +{ + b1 = __extension__(v16qi){0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22}; + h1 = __extension__(v8hi){0x2222, 0x2222, 0x2222, 0x2222, + 0x2222, 0x2222, 0x2222, 0x2222}; + s1 = __extension__(v4si){0x22222222,0x22222222,0x22222222,0x22222222}; + l1 = __extension__(v2di){0x2222222222222222ULL,0x2222222222222222ULL}; + b2 = __extension__(v32qi){0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22}; + h2 = __extension__(v16hi){0x2222, 0x2222, 0x2222, 0x2222, + 0x2222, 0x2222, 0x2222, 0x2222, + 0x2222, 0x2222, 0x2222, 0x2222, + 0x2222, 0x2222, 0x2222, 0x2222}; + s2 = __extension__(v8si){0x22222222,0x22222222,0x22222222,0x22222222, + 0x22222222,0x22222222,0x22222222,0x22222222}; + l2 = __extension__(v4di){0x2222222222222222ULL,0x2222222222222222ULL, + 0x2222222222222222ULL,0x2222222222222222ULL}; + b3 = __extension__(v64qi){0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22}; + h3 = __extension__(v32hi){0x2222, 0x2222, 0x2222, 0x2222, + 0x2222, 0x2222, 0x2222, 0x2222, + 0x2222, 0x2222, 0x2222, 0x2222, + 0x2222, 0x2222, 0x2222, 0x2222, + 0x2222, 0x2222, 0x2222, 0x2222, + 0x2222, 0x2222, 0x2222, 0x2222, + 0x2222, 0x2222, 0x2222, 0x2222, + 0x2222, 0x2222, 0x2222, 0x2222}; + s3 = __extension__(v16si){0x22222222,0x22222222,0x22222222,0x22222222, + 0x22222222,0x22222222,0x22222222,0x22222222, + 0x22222222,0x22222222,0x22222222,0x22222222, + 0x22222222,0x22222222,0x22222222,0x22222222}; + l3 = __extension__(v8di){0x2222222222222222ULL,0x2222222222222222ULL, + 0x2222222222222222ULL,0x2222222222222222ULL, + 0x2222222222222222ULL,0x2222222222222222ULL, + 0x2222222222222222ULL,0x2222222222222222ULL}; +} |