[Bug tree-optimization/71026] Missing division optimizations
wdijkstr at arm dot com
gcc-bugzilla@gcc.gnu.org
Wed Aug 24 14:47:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71026
--- Comment #3 from Wilco <wdijkstr at arm dot com> ---
(In reply to ktkachov from comment #2)
> The transforms
>
> int f4(float x) { return (1.0f / x) < 0.0f; } // -> x < 0.0f
> int f5(float x) { return (x / 2.0f) <= 0.0f; } // -> x <= 0.0f
>
> can be done as match.pd patterns, no?
Note f5 is already transformed to (x * 0.5f) <= 0.0f even with -O2. The more
general form for that one is (X * C0) <= C1 -> X <= C1/C0.
More information about the Gcc-bugs
mailing list