This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/58727] Sub-optimal code for bit clear/set sequence
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Oct 2013 07:06:43 +0000
- Subject: [Bug tree-optimization/58727] Sub-optimal code for bit clear/set sequence
- Auto-submitted: auto-generated
- References: <bug-58727-4 at http dot gcc dot gnu dot org/bugzilla/>
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.