http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49715
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Keywords| |missed-optimization Last reconfirmed| |2011.07.12 12:18:02 Component|target |tree-optimization CC| |rguenth at gcc dot gnu.org Ever Confirmed|0 |1 --- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-12 12:18:02 UTC --- Confirmed. VRP could do this transformation. I'm not sure it's always worth or if there is a target that can do faster unsigned -> float conversion than signed -> float conversion (though I doubt that). Probably similar optimization can be applied for float func (unsigned long long x) { return (x & 0xfffff) * 0.01f; } that is, introduce a truncation so that the int->float expander can use floatsi instead of floatdi which might not be available either. It happens that i?86 defines floatunsssi, so depending on the availability of a unsigned -> float expander isn't a good profitability check. The odd thing is of course that VRP would _insert_ a conversion ...