[Bug middle-end/93939] missing optimization for floating-point expression converted to integer whose result is known at compile time

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 26 08:04:00 GMT 2020


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

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
typedef long T;

also generates a comparison with 24.

The main issue is that b is used outside of the branch controlled by if(b==8),
so a naive substitution misses it. Repeating 3*b in the branch is useless, we
CSE it anyway. Still, DOM manages the optimization for int, so there is hope.


More information about the Gcc-bugs mailing list