i386: load-operate-store-test

2011-04-01 Thread Alex
Hello All, I compiled a very simple code on a Intel targets: int a, b, c, d; void func1(void) { a = a & b; if(a) c = d; } The assembler generated was (on cygwin 32-bit): movl_b, %eax andl_a, %eax testl %eax, %eax movl%eax, _a

Re: i386: load-operate-store-test

2011-04-01 Thread Andrew Pinski
On Fri, Apr 1, 2011 at 8:57 PM, Alex wrote: >  If I understood correct, gcc could replace insns 5, 7, 8 and 9 by the insn > defined as "*and_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 abo

Re: i386: load-operate-store-test

2011-04-01 Thread Serge Belyshev
Andrew Pinski writes: > On Fri, Apr 1, 2011 at 8:57 PM, Alex wrote: >>  If I understood correct, gcc could replace insns 5, 7, 8 and 9 by the insn >> defined as "*and_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 th