This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Guard use of modulo in cshift (speedup protein)
- From: Thomas Koenig <tkoenig at netcologne dot de>
- To: Michael Matz <matz at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Wed, 11 Apr 2012 10:27:44 +0200
- Subject: Re: Guard use of modulo in cshift (speedup protein)
- References: <Pine.LNX.4.64.1204101646390.25409@wotan.suse.de>
Hi Michael,
could you replace
+ if (shift< 0 || shift>= len)
by
> + if (unlikely(shift< 0 || shift>= len))
? This could save a few more cycles.
Thomas