On Mon, Jan 13, 2014 at 6:37 PM, Bill Schmidt <wschm...@linux.vnet.ibm.com> wrote: > This patch provides for interpreting parity of element numbers for the > Altivec vec_mule and vec_mulo intrinsics as big-endian (left to right in > a vector register) when targeting a little endian machine and specifying > -maltivec=be. New test cases are added to test this functionality on > all supported vector types. > > The main change is in the altivec.md define_insns for > vec_widen_{su}mult_{even,odd}_{v8hi,v16qi}, where we now test for > VECTOR_ELT_ORDER_BIG rather than BYTES_BIG_ENDIAN in order to treat the > element order as big-endian. However, this necessitates changes to > other places in altivec.md where we previously called > gen_vec_widen_{su}mult_*. The semantics of these internal uses are not > affected by -maltivec=be, so these are now replaced with direct > generation of the underlying instructions that were previously > generated. > > Bootstrapped and tested with no new regressions on > powerpc64{,le}-unknown-linux-gnu. Ok for trunk? > > Thanks, > Bill > > > gcc: > > 2014-01-13 Bill Schmidt <wschm...@vnet.linux.ibm.com> > > * config/rs6000/altivec.md (mulv8hi3): Explicitly generate vmulesh > and vmulosh rather than call gen_vec_widen_smult_*. > (vec_widen_umult_even_v16qi): Test VECTOR_ELT_ORDER_BIG rather > than BYTES_BIG_ENDIAN to determine use of even or odd instruction. > (vec_widen_smult_even_v16qi): Likewise. > (vec_widen_umult_even_v8hi): Likewise. > (vec_widen_smult_even_v8hi): Likewise. > (vec_widen_umult_odd_v16qi): Likewise. > (vec_widen_smult_odd_v16qi): Likewise. > (vec_widen_umult_odd_v8hi): Likewise. > (vec_widen_smult_odd_v8hi): Likewise. > (vec_widen_umult_hi_v16qi): Explicitly generate vmuleub and > vmuloub rather than call gen_vec_widen_umult_*. > (vec_widen_umult_lo_v16qi): Likewise. > (vec_widen_smult_hi_v16qi): Explicitly generate vmulesb and > vmulosb rather than call gen_vec_widen_smult_*. > (vec_widen_smult_lo_v16qi): Likewise. > (vec_widen_umult_hi_v8hi): Explicitly generate vmuleuh and vmulouh > rather than call gen_vec_widen_umult_*. > (vec_widen_umult_lo_v8hi): Likewise. > (vec_widen_smult_hi_v8hi): Explicitly gnerate vmulesh and vmulosh > rather than call gen_vec_widen_smult_*. > (vec_widen_smult_lo_v8hi): Likewise. > > gcc/testsuite: > > 2014-01-13 Bill Schmidt <wschm...@vnet.linux.ibm.com> > > * gcc.dg/vmx/mult-even-odd.c: New. > * gcc.dg/vmx/mult-even-odd-be-order.c: New.
Okay. The less said the better. Thanks, David