[Bug tree-optimization/58727] Sub-optimal code for bit clear/set sequence

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 15 07:06:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58727

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I guess once we move (or duplicate) this optimization to be performed at GIMPLE
in some pass (gimple_fold, forwprop, something else), perhaps after IPA we
could add some target hook how expensive a constant is and we could try
different variants and see what would be cheapest.  Without that what GCC does
now is right, generally for most targets the fewer bits set in a constant the
better if the target cares at all.



More information about the Gcc-bugs mailing list