This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: (R5900) Implementing Vector Support


On Tuesday, May 10, 2016 1:54 AM, Richard Henderson <> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]