This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Implement -maltivec=be for vec_mergeh and vec_mergel Altivec builtins
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 28 Jan 2014 21:29:34 -0500
- Subject: Re: [PATCH, rs6000] Implement -maltivec=be for vec_mergeh and vec_mergel Altivec builtins
- Authentication-results: sourceware.org; auth=none
- References: <1390522133 dot 3449 dot 109 dot camel at gnopaine> <1390954630 dot 28411 dot 4 dot camel at gnopaine>
On Tue, Jan 28, 2014 at 7:17 PM, Bill Schmidt
<wschmidt@linux.vnet.ibm.com> wrote:
> David suggested privately that I rework some of the pattern names to fit
> in with existing practice. I've done this, and the result is below.
> Bootstrapped and tested on powerpc64{,le}-unknown-linux-gnu with no
> regressions. Is this ok for trunk?
> gcc:
>
> 2014-01-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
>
> * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Use
> CODE_FOR_altivec_vmrg*_direct rather than CODE_FOR_altivec_vmrg*.
> * config/rs6000/vsx.md (vsx_mergel_<mode>): Adjust for
> -maltivec=be with LE targets.
> (vsx_mergeh_<mode>): Likewise.
> * config/rs6000/altivec.md (UNSPEC_VMRG[HL]_DIRECT): New
> unspecs.
> (mulv8hi3): Use gen_altivec_vmrg[hl]w_direct.
> (altivec_vmrghb): Replace with define_expand and new
> *altivec_vmrghb_internal insn; adjust for -maltivec=be with LE
> targets.
> (altivec_vmrghb_direct): New define_insn.
> (altivec_vmrghh): Replace with define_expand and new
> *altivec_vmrghh_internal insn; adjust for -maltivec=be with LE
> targets.
> (altivec_vmrghh_direct): New define_insn.
> (altivec_vmrghw): Replace with define_expand and new
> *altivec_vmrghw_internal insn; adjust for -maltivec=be with LE
> targets.
> (altivec_vmrghw_direct): New define_insn.
> (*altivec_vmrghsf): Adjust for endianness.
> (altivec_vmrglb): Replace with define_expand and new
> *altivec_vmrglb_internal insn; adjust for -maltivec=be with LE
> targets.
> (altivec_vmrglb_direct): New define_insn.
> (altivec_vmrglh): Replace with define_expand and new
> *altivec_vmrglh_internal insn; adjust for -maltivec=be with LE
> targets.
> (altivec_vmrglh_direct): New define_insn.
> (altivec_vmrglw): Replace with define_expand and new
> *altivec_vmrglw_internal insn; adjust for -maltivec=be with LE
> targets.
> (altivec_vmrglw_direct): New define_insn.
> (*altivec_vmrglsf): Adjust for endianness.
> (vec_widen_umult_hi_v16qi): Use gen_altivec_vmrghh_direct.
> (vec_widen_umult_lo_v16qi): Use gen_altivec_vmrglh_direct.
> (vec_widen_smult_hi_v16qi): Use gen_altivec_vmrghh_direct.
> (vec_widen_smult_lo_v16qi): Use gen_altivec_vmrglh_direct.
> (vec_widen_umult_hi_v8hi): Use gen_altivec_vmrghw_direct.
> (vec_widen_umult_lo_v8hi): Use gen_altivec_vmrglw_direct.
> (vec_widen_smult_hi_v8hi): Use gen_altivec_vmrghw_direct.
> (vec_widen_smult_lo_v8hi): Use gen_altivec_vmrglw_direct.
>
> gcc/testsuite:
>
> 2014-01-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
>
> * gcc.dg/vmx/merge-be-order.c: New.
> * gcc.dg/vmx/merge.c: New.
> * gcc.dg/vmx/merge-vsx-be-order.c: New.
> * gcc.dg/vmx/merge-vsx.c: New.
Thanks for adjusting the patch to be more consistent with the pattern
names used in the rest of the port. The patch is okay.
Thanks, David