(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
powerpc/
ppc-target-1.c
       1  /* { dg-do compile { target { powerpc*-*-* } } } */
       2  /* { dg-skip-if "" { powerpc*-*-darwin* } } */
       3  /* { dg-require-effective-target powerpc_vsx_ok } */
       4  /* { dg-options "-O2 -ffast-math -mdejagnu-cpu=power5 -mabi=altivec" } */
       5  /* { dg-final { scan-assembler-times "fabs" 3 } } */
       6  /* { dg-final { scan-assembler-times "fnabs" 3 } } */
       7  /* { dg-final { scan-assembler-times "fsel" 3 } } */
       8  /* { dg-final { scan-assembler-times "fcpsgn\|xscpsgndp" 4 } } */
       9  
      10  double normal1 (double, double);
      11  double power5  (double, double) __attribute__((__target__("cpu=power5")));
      12  double power6  (double, double) __attribute__((__target__("cpu=power6")));
      13  double power6x (double, double) __attribute__((__target__("cpu=power6x")));
      14  double power7  (double, double) __attribute__((__target__("cpu=power7")));
      15  double power7n (double, double) __attribute__((__target__("cpu=power7,no-vsx")));
      16  double normal2 (double, double);
      17  
      18  /* fabs/fnabs/fsel */
      19  double normal1 (double a, double b)
      20  {
      21    return __builtin_copysign (a, b);
      22  }
      23  
      24  /* fabs/fnabs/fsel */
      25  double power5  (double a, double b)
      26  {
      27    return __builtin_copysign (a, b);
      28  }
      29  
      30  /* fcpsgn */
      31  double power6  (double a, double b)
      32  {
      33    return __builtin_copysign (a, b);
      34  }
      35  
      36  /* fcpsgn */
      37  double power6x (double a, double b)
      38  {
      39    return __builtin_copysign (a, b);
      40  }
      41  
      42  /* xscpsgndp */
      43  double power7  (double a, double b)
      44  {
      45    return __builtin_copysign (a, b);
      46  }
      47  
      48  /* fcpsgn */
      49  double power7n (double a, double b)
      50  {
      51    return __builtin_copysign (a, b);
      52  }
      53  
      54  /* fabs/fnabs/fsel */
      55  double normal2 (double a, double b)
      56  {
      57    return __builtin_copysign (a, b);
      58  }