Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr78056-4.c
blobaaae13dc217a7a1f830c383d4cdaae8652e085ea
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
3 /* powerpc_vsx_ok represents power7 */
4 /* { dg-require-effective-target powerpc_vsx_ok } */
5 /* { dg-skip-if "" { powerpc_p8vector_ok } } */
6 /* { dg-skip-if "" { powerpc*-*-aix* } } */
7 /* { dg-options "-mcpu=power7" } */
9 /* This test should succeed on both 32- and 64-bit configurations. */
10 #include <altivec.h>
12 /* Though the command line specifies power7 target, this function is
13 to support power8, which will fail because this platform does not
14 support power8. */
15 __attribute__((target("cpu=power8")))
16 char
17 char_fetch_add_relaxed (char *ptr, int value)
18 { /* { dg-warning "lacks power8 support" } */
19 return __atomic_fetch_add (ptr, value, __ATOMIC_RELAXED);