On Sun, Jul 2, 2017 at 6:03 PM, Yuri Gribov <tetra2...@gmail.com> wrote: > Hi all, > > This is initial patch for > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57371 . Per Joseph's > suggestion it optimizes > (float)lhs CMP rhs > (double)lhs CMP rhs > to > lhs CMP (typeof(x))rhs > whenever typeof(x) can be precisely represented by floating-point type > (e.g. short by float or int by double) and rhs can be precisely > represented by typeof(x). > > Bootstrapped/regtested on x64. Ok for trunk?
Seems my understanding of real_to_integer was too naive. I'll fix the patch and send updated variant. -Y