Re: [PATCH, x86] merge movsd/movhpd pair in peephole

2014-04-22 Thread Bin.Cheng
On Tue, Apr 22, 2014 at 2:59 AM, Xinliang David Li davi...@google.com wrote: Bin, when will the patch for the generic pass be available for review? Hi, The patch is still under working and reviewing. For arm we only need to handle simple load/stores, so it may need to be extended to handle

Re: [PATCH, x86] merge movsd/movhpd pair in peephole

2014-04-21 Thread Uros Bizjak
On Mon, Apr 21, 2014 at 8:00 PM, Wei Mi w...@google.com wrote: llvm will merge movsd/movhpd to movupd while gcc will not. The merge is beneficial on x86 machines starting from Nehalem. The patch is to add the merging in peephole. bootstrap and regression pass. Is it ok for stage1? Let's

Re: [PATCH, x86] merge movsd/movhpd pair in peephole

2014-04-21 Thread Xinliang David Li
Bin, when will the patch for the generic pass be available for review? David On Wed, Apr 9, 2014 at 7:27 PM, Bin.Cheng amker.ch...@gmail.com wrote: On Thu, Apr 10, 2014 at 8:18 AM, Wei Mi w...@google.com wrote: Hi, For the testcase 1.c #include emmintrin.h double a[1000]; __m128d

Re: [PATCH, x86] merge movsd/movhpd pair in peephole

2014-04-09 Thread Bin.Cheng
On Thu, Apr 10, 2014 at 8:18 AM, Wei Mi w...@google.com wrote: Hi, For the testcase 1.c #include emmintrin.h double a[1000]; __m128d foo1() { __m128d res; res = _mm_load_sd(a[1]); res = _mm_loadh_pd(res, a[2]); return res; } llvm will merge movsd/movhpd to movupd while gcc

Re: [PATCH, x86] merge movsd/movhpd pair in peephole

2014-04-09 Thread Wei Mi
Hi Bin, Yes, we have the same problem that if movsd and movhpd are separated, peephole cannot merge them. The patch could solve the motivational performance issue we saw to a good extent, but maybe there is still space to improve if peephole misses some pairs. Glad to know you are working on this