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 short doAbsoluteDifferenceUnsignedShortMacro(__vector unsigned short * p,__vector unsigned short * q)10doAbsoluteDifferenceUnsignedShortMacro (__vector unsigned short *p, 11 __vector unsigned short *q) 12 { 13 __vector unsigned short result, source_1, source_2; 14 15 source_1 = *p; 16 source_2 = *q; 17 18 result = vec_absd (source_1, source_2); 19 return result; 20 } 21 22 /* { dg-final { scan-assembler "vabsduh" } } */ 23