Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.dg / ext / altivec-6.C
blob5ca23028baeac885bd94e75b67134d679cedffad
1 /* Test for correct handling of literal arguments. */
2 /* Author: Ziemowit Laski  <zlaski@apple.com>  */
3 /* { dg-do compile { target powerpc*-*-* } } */
4 /* { dg-xfail-if "" { "powerpc-*-eabispe*" "powerpc-ibm-aix*" } { "*" } { "" } } */
5 /* { dg-options "-maltivec" } */
7 #include <altivec.h>
9 void foo(void) {
10   const unsigned char *buf;
11   vector pixel vp = { 3, 4, 5, 6 };
12   vector bool int vbi = { 1, 0, 1, 0 };
13   vector bool short vbs = { 1, 0, 1, 0, 1, 0, 1, 0 };
14   vector bool char vbc = { 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 };
15   vector signed char vsc;
16   int a = 3;
17   
18   vec_dst(buf, a, 1);
19   vec_dstst(buf, a, 2);
20   vec_dststt(buf, a, 3);
21   vec_dststt(buf, a, 2);
23   vp = vec_sld(vp, vp, 5);
24   vbc = vec_splat(vbc, 7);
25   vbs = vec_splat(vbs, 12);
26   vp = vec_splat(vp, 17);
27   vbi = vec_splat(vbi, 31);