Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/pr78056-1.c

raw
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "" { powerpc*-*-aix* } } */
3 /* { dg-options "-mdejagnu-cpu=power8" } */
4 /* { dg-require-effective-target powerpc_altivec } */
5
6 /* This test should succeed on both 32- and 64-bit configurations. */
7 #include <altivec.h>
8
9 /* Though the command line specifies power8 target, this function is
10 to support power9. */
11 __attribute__((target("cpu=power9")))
12 int get_random ()
13 {
14 return __builtin_darn_32 ();
15 }
16
17 /* { dg-final { scan-assembler "darn" } } */