[Bug tree-optimization/22326] promotions (from float to double) are not removed when they should be able to
luoxhu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 17 07:10:32 GMT 2020
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;
}
More information about the Gcc-bugs
mailing list