Re: [i386] recognize haddpd

2012-10-08 Thread Uros Bizjak
On Mon, Oct 8, 2012 at 9:36 PM, Marc Glisse wrote: > On Mon, 8 Oct 2012, Uros Bizjak wrote: > >> You missed the most important sseadd1 addition, the one that prevents >> checking of operand2 when calculating "memory" attribute: >> >> (and (eq_attr "type" >> "!alu1,negnot,

Re: [i386] recognize haddpd

2012-10-08 Thread Marc Glisse
On Mon, 8 Oct 2012, Uros Bizjak wrote: You missed the most important sseadd1 addition, the one that prevents checking of operand2 when calculating "memory" attribute: (and (eq_attr "type" "!alu1,negnot,ishift1, imov,imovx,icmp,test,bitmanip,

Re: [i386] recognize haddpd

2012-10-08 Thread Uros Bizjak
On Mon, Oct 8, 2012 at 6:08 PM, Uros Bizjak wrote: >> +(define_insn "*sse3_haddv2df3" >>[(set (match_operand:V2DF 0 "register_operand" "=x,x") >> (vec_concat:V2DF >> - (plusminus:DF >> + (plus:DF >> + (vec_select:DF >> + (match_operand:V2DF 1 "reg

Re: [i386] recognize haddpd

2012-10-08 Thread Uros Bizjak
On Mon, Oct 8, 2012 at 4:40 PM, Marc Glisse wrote: > On Fri, 28 Sep 2012, Uros Bizjak wrote: > > 2) {v[0]-v[1], v[0]-v[1]} is not recognized as a hsubpd because > vec_duplicate doesn't match vec_concat. Do we really need to duplicate > (no > pun intended) the pattern? >> >> >> You

Re: [i386] recognize haddpd

2012-10-08 Thread Marc Glisse
On Fri, 28 Sep 2012, Uros Bizjak wrote: 2) {v[0]-v[1], v[0]-v[1]} is not recognized as a hsubpd because vec_duplicate doesn't match vec_concat. Do we really need to duplicate (no pun intended) the pattern? You can add this transformation to simplify-rtx.c. Probably vec_concat with two equal op

Re: [i386] recognize haddpd

2012-09-28 Thread Uros Bizjak
On Wed, Sep 26, 2012 at 5:16 PM, Marc Glisse wrote: > Adding an x86 maintainer in Cc: >>> this patch passes bootstrap+testsuite. It is probably wrong in many ways, >>> but I don't know enough to do more without some advice. >>> >>> The goal is to recognize that v[0]+v[1] can be computed with hadd

Re: [i386] recognize haddpd

2012-09-26 Thread Marc Glisse
Adding an x86 maintainer in Cc: On Tue, 11 Sep 2012, Marc Glisse wrote: Hello, any advice? http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00044.html On Sun, 2 Sep 2012, Marc Glisse wrote: Hello, this patch passes bootstrap+testsuite. It is probably wrong in many ways, but I don't know enou

Re: [i386] recognize haddpd

2012-09-11 Thread Marc Glisse
Hello, any advice? http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00044.html On Sun, 2 Sep 2012, Marc Glisse wrote: Hello, this patch passes bootstrap+testsuite. It is probably wrong in many ways, but I don't know enough to do more without some advice. The goal is to recognize that v[0]+v[1

[i386] recognize haddpd

2012-09-02 Thread Marc Glisse
Hello, this patch passes bootstrap+testsuite. It is probably wrong in many ways, but I don't know enough to do more without some advice. The goal is to recognize that v[0]+v[1] can be computed with haddpd. With the patch, v[0]-v[1] becomes hsubpd and v[1]+v[0] becomes haddpd. Also, thanks to