diagnostics: move output formats from diagnostic.{c,h} to their own files
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / byte-in-either-range-0.c
blob9aa1346a27bc0d773b19638241319bf0a8689349
1 /* { dg-do compile } */
2 /* { dg-options "-mdejagnu-cpu=power9 -mvsx" } */
3 /* { dg-require-effective-target powerpc_vsx } */
5 /* This test should succeed on both 32- and 64-bit configurations. */
6 #include <altivec.h>
8 int
9 test_byte_in_either_range (unsigned char b,
10 unsigned char first_lo_bound,
11 unsigned char first_hi_bound,
12 unsigned char second_lo_bound,
13 unsigned char second_hi_bound)
15 unsigned int range_encoding;
16 range_encoding = ((first_hi_bound << 24) | (first_lo_bound << 16)
17 | (second_hi_bound << 8) | second_lo_bound);
19 return __builtin_byte_in_either_range (b, range_encoding);
22 /* { dg-final { scan-assembler "cmprb" } } */
23 /* { dg-final { scan-assembler "setb" } } */