This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: i386: load-operate-store-test
Andrew Pinski <pinskia@gmail.com> writes:
> On Fri, Apr 1, 2011 at 8:57 PM, Alex <cirrus75@uol.com.br> wrote:
>> ÂIf I understood correct, gcc could replace insns 5, 7, 8 and 9 by the insn
>> defined as "*and<mode>_2", but it seems "combine" did not tried that.
>
> Yes you missed that combine in GCC only acts on 3 insns at a time.
> Though that has changed in GCC 4.6 and above so try to look see if the
> trunk does this optimization.
FYI, gcc-2.95.4 with -O3 -fomit-frame-pointer -march=pentiumpro generates
the following:
func1:
movl a,%eax
andl b,%eax
movl %eax,a
je .L3
movl d,%eax
movl %eax,c
.L3:
ret