This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Speed up _cpp_clean_line and _cpp_skip_block_comment
Paolo Carlini <pcarlini@unitus.it> writes:
> ... another curiosity is that, comparing the code generated
> by 3.3.1 and current 3.4 for the original testcase:
>
> void f(int* k, int j)
> {
> int i;
>
> for (i = 0; i < j; ++i)
> *k = *k + 2 * ((*k) - 1);
> }
Er what? That doesn't look anything like my test case.
> at -O2, the inner loops are:
>
> 3.3.1
> -----
> 10: 48 dec %eax
> 11: 8d 54 52 fe lea 0xfffffffe(%edx,%edx,2),%edx
> 15: 75 f9 jne 10 <f+0x10>
>
> 3.4
> ---
> 10: 8d 4c 52 fe lea 0xfffffffe(%edx,%edx,2),%ecx
> 14: 48 dec %eax
> 15: 89 ca mov %ecx,%edx
> 17: 75 f7 jne 10 <f+0x10>
>
> isn't 3.3.1 better?
I would say so. 3.4 with -fnew-ra produces
.L5:
decl %edx
leal -2(%eax,%eax,2), %eax
jne .L5
zw