OSDN Git Service

2004-05-20 H.J. Lu <hongjiu.lu@intel.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / altivec-13.c
1 /* { dg-do compile { target powerpc*-*-* } } */
2 /* { dg-options "-maltivec" } */
3 /* Author: Ziemowit Laski  <zlaski@apple.com>  */
4
5 /* This test case exercises intrinsic/argument combinations that,
6    while not in the Motorola AltiVec PIM, have nevertheless crept
7    into the AltiVec vernacular over the years.  */
8
9 #include <altivec.h>
10
11 void foo (void) 
12 {
13   vector bool int boolVec1 = (vector bool int) vec_splat_u32(3);
14   vector bool short boolVec2 = (vector bool short) vec_splat_u16(3);
15   vector bool char boolVec3 = (vector bool char) vec_splat_u8(3);
16
17   boolVec1 = vec_sld( boolVec1, boolVec1, 4 );
18   boolVec2 = vec_sld( boolVec2, boolVec2, 2 );
19   boolVec3 = vec_sld( boolVec3, boolVec3, 1 );
20 }