[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug target/50223] AVRGCC - dont clear r26 and r27.....its a (small) waste of CPU cycles.
From:       "gjl at gcc dot gnu.org" <gcc-bugzilla () gcc ! gnu ! org>
Date:       2011-08-31 20:23:25
Message-ID: bug-50223-4-p62rAOaKaL () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
                 CC|                            |gjl at gcc dot gnu.org

--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-08-31 20:23:25 UTC ---
This is just a missed optimization. Thus, you won't see a fix before gcc 4.7.

For gcc 4.7, notice that there are optimized versions of builtins that perform
your arithmetic like

__builtin_clz/clzl/clzll (count leading zeros)
__builtin_ctz/ctzl/ctzll (count trailing zeros)
__builtin_ffs/ffsl/ffsll (find first (lowest) set bit)
...
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic