[Bug tree-optimization/124571] `ABS<(float)(us1 - us2)> < 1.0f` can be optimized to us1 == us2

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 19 08:52:12 GMT 2026


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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> Also turning (float)a - (float)b into (float)(a - b), right?  Which should
> likely be done in a int<->float promotion pass that places conversions in a
> LCM way.

Of course (float)((int)a - (int)b).


More information about the Gcc-bugs mailing list