This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[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 at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 31 Aug 2011 20:23:25 +0000
- Subject: [Bug target/50223] AVRGCC - dont clear r26 and r27.....its a (small) waste of CPU cycles.
- Auto-submitted: auto-generated
- References: <bug-50223-4@http.gcc.gnu.org/bugzilla/>
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)
...