1 /* { dg-do compile { target { powerpc*-*-* } } } */ 2 /* { dg-require-effective-target powerpc_p9vector_ok } */ 3 /* { dg-skip-if "" { powerpc*-*-aix* } } */ 4 /* { dg-options "-mdejagnu-cpu=power9" } */ 5 6 /* This test should succeed on both 32- and 64-bit configurations. */ 7 #include <altivec.h> 8 9 __vector unsigned int doAbsoluteDifferenceUnsignedInt(__vector unsigned int * p,__vector unsigned int * q)10doAbsoluteDifferenceUnsignedInt (__vector unsigned int *p, 11 __vector unsigned int *q) 12 { 13 __vector unsigned int source_1, source_2; 14 __vector unsigned int result; 15 16 source_1 = *p; 17 source_2 = *q; 18 19 result = __builtin_vec_vadu (source_1, source_2); 20 return result; 21 } 22 23 /* { dg-final { scan-assembler "vabsduw" } } */ 24