Re: [PATCH, rs6000] (3/3) Fix mulv4si3 and mulv8hi3 patterns for little endian

2013-11-05 Thread David Edelsohn
On Mon, Nov 4, 2013 at 7:33 PM, Bill Schmidt wrote: > Hi, > > Here's a revised version of this patch according to Richard's > suggestions. It differs from the previous version only in the method > used to ensure vmulouh is generated; we now call the new > gen_altivec_vmulouh to accomplish this. >

Re: [PATCH, rs6000] (3/3) Fix mulv4si3 and mulv8hi3 patterns for little endian

2013-11-04 Thread Bill Schmidt
Hi, Here's a revised version of this patch according to Richard's suggestions. It differs from the previous version only in the method used to ensure vmulouh is generated; we now call the new gen_altivec_vmulouh to accomplish this. Bootstrapped and tested on powerpc64{,le}-unknown-linux-gnu with

Re: [PATCH, rs6000] (3/3) Fix mulv4si3 and mulv8hi3 patterns for little endian

2013-11-04 Thread Bill Schmidt
On Mon, 2013-11-04 at 15:48 +, Richard Sandiford wrote: > Bill Schmidt writes: > > + /* We need this to be vmulouh for both big and little endian, > > + but for little endian we would swap this, so avoid that. */ > > + if (BYTES_BIG_ENDIAN) > > + emit_insn (gen_vec_widen_umult_od

Re: [PATCH, rs6000] (3/3) Fix mulv4si3 and mulv8hi3 patterns for little endian

2013-11-04 Thread Richard Sandiford
Bill Schmidt writes: > + /* We need this to be vmulouh for both big and little endian, > + but for little endian we would swap this, so avoid that. */ > + if (BYTES_BIG_ENDIAN) > + emit_insn (gen_vec_widen_umult_odd_v8hi (low_product, one, two)); > + else > + emit_insn (gen_vec

[PATCH, rs6000] (3/3) Fix mulv4si3 and mulv8hi3 patterns for little endian

2013-11-03 Thread Bill Schmidt
Hi, This patch contains two more fixes related to the multiply even/odd problem. First, it changes the mulv4si3 pattern so that it always uses the vmulouh (vector multiply odd halfword) instruction regardless of endianness. The reason for this is that we are not really multiplying halfwords, but