view gcc/testsuite/gcc.dg/tree-ssa/mult-abs-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 1830386684a0
line wrap: on
line source

/* { dg-do compile } */
/* { dg-require-effective-target c99_runtime } */
/* { dg-options "-O2 -ffast-math -fdump-tree-gimple" } */
/* { dg-add-options c99_runtime } */

float f(float x)
{
  return x * (x > 0.f ? -1.f : 1.f);
}
float f1(float x)
{
  return x * (x > 0.f ? 1.f : -1.f);
}
float g(float x)
{
  return x * (x >= 0.f ? -1.f : 1.f);
}
float g1(float x)
{
  return x * (x >= 0.f ? 1.f : -1.f);
}
float h(float x)
{
  return x * (x < 0.f ? -1.f : 1.f);
}
float h1(float x)
{
  return x * (x < 0.f ? 1.f : -1.f);
}
float i(float x)
{
  return x * (x <= 0.f ? -1.f : 1.f);
}
float i1(float x)
{
  return x * (x <= 0.f ? 1.f : -1.f);
}
/* { dg-final { scan-tree-dump-times "ABS" 8 "gimple"} } */