[Bug tree-optimization/90427] missing "sign flipping" optimization

2019-05-10 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90427

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Most likely, but that would be -frounding-math only, no?
That said, at the GIMPLE level we really don't know if the target will have
immediate - register or register - immediate or both instructions etc., so
maybe it might be better to do it on RTL.  Although, after RTL expansion, we
usually have constants in memory (constant pool) rather than in registers, so
the optimization would need to also do some analysis on what kind of constants
the function uses and if the sign flipping wouldn't increase number of those
constants (it can of course also decrease that).

[Bug tree-optimization/90427] missing "sign flipping" optimization

2019-05-10 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90427

--- Comment #1 from Andrew Pinski  ---
I would suspect there are rounding mode issues with it.