]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/vector-6.c
Remove Cell Broadband Engine SPU targets
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vector-6.c
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-ssa -fdump-tree-ccp1 -Wno-psabi -w" } */
3 /* { dg-additional-options "-msse2" { target i?86-*-* x86_64-*-* } } */
4 /* { dg-additional-options "-maltivec" { target powerpc_altivec_ok } } */
5
6 typedef int v4si __attribute__((vector_size (4 * sizeof (int))));
7
8 v4si test1 (v4si v, int i)
9 {
10 ((int *)&v)[0] = i;
11 return v;
12 }
13
14 v4si test2 (v4si v, int i)
15 {
16 int *p = (int *)&v;
17 *p = i;
18 return v;
19 }
20
21 v4si test3 (v4si v, int i)
22 {
23 ((int *)&v)[3] = i;
24 return v;
25 }
26
27 v4si test4 (v4si v, int i)
28 {
29 int *p = (int *)&v;
30 p += 3;
31 *p = i;
32 return v;
33 }
34
35 /* { dg-final { scan-tree-dump-times "Now a gimple register: v" 2 "ssa" { target { { i?86-*-* x86_64-*-* aarch64*-*-* } || { powerpc_altivec_ok } } } } } */
36 /* { dg-final { scan-tree-dump-times "Now a gimple register: v" 2 "ccp1" { target { { i?86-*-* x86_64-*-* aarch64*-*-* } || { powerpc_altivec_ok } } } } } */