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: Sun, 29 May 2016 07:59:14 +0000 (UTC)
- Subject: Re: (R5900) Implementing Vector Support
- Authentication-results: sourceware.org; auth=none
- References: <23a57920-3e9e-05f9-e428-a7e5e89d4de9 at redhat dot com> <133091800 dot 362759 dot 1462978450117 dot JavaMail dot yahoo at mail dot yahoo dot com> <93d40024-8baf-f571-765e-3f3ae59961df at redhat dot com> <687383190 dot 1940916 dot 1463221310394 dot JavaMail dot yahoo at mail dot yahoo dot com> <850bcd56-a219-a153-b467-8414fa19c207 at redhat dot com> <300510214 dot 326837 dot 1463573792037 dot JavaMail dot yahoo at mail dot yahoo dot com> <e7ccb4e0-6b37-ea2c-01bb-4fff2742ca32 at redhat dot com> <1735082185 dot 4758122 dot 1463655944237 dot JavaMail dot yahoo at mail dot yahoo dot com>
- Reply-to: Woon yung Liu <ysai187 at yahoo dot com>
Hi Richard,
I have solved the problems with the mulv8hi3 pattern; I needed to adjust the code within mips.c to allow the double-sized vector modes and to allow vector modes into the LO+HI accumulators.
I now have a choice to choose between the design that you have suggested or the one that I came up with. If it would be preferable to not mix the logical vector modes (i.e. those 256-bit modes that the R5900 does not actually support) into mips.c, then I suppose that I would go with my design because the 256-bit stuff would be restricted to the patterns within 5900.md.
I have also implemented vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_lo, vec_unpacks_hi, vec_pack_trunc, vec_set and vec_extract patterns for the V16QI, V8HI and V4SI patterns. The only pattern that I haven't implemented yet is vec_init.
The problem with the vectorization stuff has not changed (https://gcc.gnu.org/ml/gcc/2016-05/msg00143.html), despite the introduction of these new patterns.
You wrote that I should look at tree-vect-stmts.c, but I have not done that yet.
What is the correct way to change the mode of registers? For example, I am doing this to change the mode for a register to V4SI within an expand:
reg = gen_rtx_REG(V4SImode, REGNO (reg));
While going through the GCC sources, it seems like such a method is not going to work if a pseudo register is passed. When are pseudo registers ever allocated?
Finally, what is the difference between define_expand and define_insn_and_split? When should I ever use define_insn_and_split?
Are define_insn_and_split patterns used to avoid pseudo registers?
Thanks and regards,
-W Y