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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to luoxhu from comment #4)
> float foo(float f, float x, float y) {
> return (fabs(f)*x+y);
> }
> 
> the input of fabs is float type, so use fabsf is enough here, drafted a
> patch to avoid double promotion when generating gimple if fabs could be
> replaced by fabsf as argument[0] is float type.

what about adding something to match.pd for:
ABS<(float_convert)f> into (float_convert)ABS<f>
This is only valid prompting and not reducing the precision.

Reply via email to