[gcc]
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / byte-in-range-1.c
blobe002c44dd8f9e8c7a3f3dae8fc2560098700c71b
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
3 /* { dg-require-effective-target powerpc_p9vector_ok } */
4 /* { dg-skip-if "" { powerpc*-*-aix* } } */
5 /* { dg-options "-mcpu=power8" } */
7 #include <altivec.h>
9 int
10 test_byte_in_range (unsigned char b,
11 unsigned char low_range, unsigned char high_range)
13 unsigned int range_encoding = (high_range << 8) | low_range;
14 return __builtin_byte_in_range (b, range_encoding); /* { dg-error "builtin function __builtin_scalar_byte_in_range requires" } */