This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: (R5900) Implementing Vector Support
- From: Woon yung Liu <ysai187 at yahoo dot com>
- To: Richard Henderson <rth at redhat dot com>, Gcc Mailing List <gcc at gcc dot gnu dot org>
- Date: Wed, 11 May 2016 14:54:10 +0000 (UTC)
- Subject: Re: (R5900) Implementing Vector Support
- Authentication-results: sourceware.org; auth=none
- References: <23a57920-3e9e-05f9-e428-a7e5e89d4de9 at redhat dot com>
- Reply-to: Woon yung Liu <ysai187 at yahoo dot com>
Hi,
On Tuesday, May 10, 2016 1:54 AM, Richard Henderson <rth@redhat.com> wrote:
>Since it appears that PMULTH naturally produces even results in RD, it would
>seem to make the most sense to attempt to construct the odd results from LO+HI.
> However, I don't see anything in the TX79 isa that's particularly helpful there.
I saw that the EE has the PMFHL.LH instruction, which loads the HI/LO register pairs (containing the multiplication result) into a single destination (i.e. truncates the multiplication result in the process), with the right order too.
I suppose that it would be suitable for implementing the mulm3 operation. But if I implement mulm3, is there still a need to implement the vec_widen_smult_hi_m and vec_widen_smult_lo_m patterns?
> would appear to produce the results gcc expects for the hi/lo multiples.
Thanks for clearing that up.
> Don't worry overmuch about initially generating two copies of the pmulth
> instruction. We have a similar problem with the ia64 patterns. Rely on the
> rtl CSE pass to remove the duplicate instructions.
I tried to implement the two patterns (vec_widen_smult_hi_m and vec_widen_smult_lo_m), but GCC wouldn't compile due to both patterns having the same operands.
Must they be expands? If so, what sort of patterns should the pcpyld and pcpyud instructions be? If I don't declare them differently, I'll have the same compilation error again (due to them having the same operands).
Thanks and regards,
-W Y