aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/copy-sign-2.c
blob: de52c5f7c8062958353d91f5031193defc9f3f91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-options "-O2 -ffast-math -fdump-tree-optimized" } */
/* { dg-do compile } */
float f(float x)
{
  float t = __builtin_copysignf (1.0f, x);
  return x * t;
}
float f1(float x)
{
  float t = __builtin_copysignf (1.0f, -x);
  return x * t;
}
/* { dg-final { scan-tree-dump-times "ABS" 2 "optimized"} } */