https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22326

--- Comment #5 from luoxhu at gcc dot gnu.org ---
With above hack, changing argument x from float to double could still generate
correct code with conversion of fabsf result:

float foo(float f, double x, float y) {
return (fabs(f)*x+y);
}

006t.gimple
__attribute__((noinline))
foo (float f, double x, float y)
{
  float D.4347;

  _1 = ABS_EXPR <f>;
  _2 = (double) _1;
  _3 = x * _2;
  _4 = (double) y;
  _5 = _3 + _4;
  D.4347 = (float) _5;
  return D.4347;
}

Reply via email to