Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / vadsdu-4.c
blobe5744d1399465a66bd57c243f53f0b92412991e8
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
3 /* { dg-require-effective-target powerpc_p9vector_ok } */
4 /* { dg-skip-if "" { powerpc*-*-aix* } } */
5 /* { dg-options "-mcpu=power9" } */
7 /* This test should succeed on both 32- and 64-bit configurations. */
8 #include <altivec.h>
10 __vector unsigned char
11 doAbsoluteDifferenceUnsignedChar (__vector unsigned char *p,
12 __vector unsigned char *q)
14 __vector unsigned char source_1, source_2;
15 __vector unsigned char result;
17 source_1 = *p;
18 source_2 = *q;
20 result = __builtin_vec_vadu (source_1, source_2);
21 return result;
24 /* { dg-final { scan-assembler "vabsdub" } } */