This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] extend.texi MIPS PS/3D Support
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: Paolo Bonzini <bonzini at gnu dot org>, Richard Henderson <rth at redhat dot com>, Dorit Naishlos <DORIT at il dot ibm dot com>
- Cc: Chao-ying Fu <fu at mips dot com>, gcc-patches at gcc dot gnu dot org, "Stephens, Nigel" <nigel at mercury dot mips dot com>, "Thekkath, Radhika" <radhika at mercury dot mips dot com>, Richard Sandiford <rsandifo at redhat dot com>, "Uhler, Mike" <uhler at mercury dot mips dot com>, Jim Wilson <wilson at specifixinc dot com>
- Date: Wed, 29 Sep 2004 11:17:57 +0200
- Subject: Re: [patch] extend.texi MIPS PS/3D Support
- References: <20040927234323.GA31317@redhat.com> <OF5912A435.A1C0FA27-ONC2256F1D.0048F9FF-C2256F1D.0049C2B1@il.ibm.com> <41596B45.5050403@gnu.org>
Yes, it should. Generic vectors should not be created by the vectorizer
(yet).
Ah, I thought that the vectorizer created its vector types with a
separate routine, but that has been fixed a while ago. The attached
patch should help.
It was bootstrapped and passes the vectorizer testsuite. Full regtest
on i686-pc-linux-gnu is in progress. Ok for mainline?
Paolo
2004-09-29 Paolo Bonzini <bonzini@gnu.org>
* tree-vectorizer.c (vectorizable_operation): Only look at the
optab in the case of vector modes; otherwise, bail out.
Index: tree-vectorizer.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-vectorizer.c,v
retrieving revision 2.12
diff -u -r2.12 tree-vectorizer.c
--- tree-vectorizer.c 25 Sep 2004 14:48:03 -0000 2.12
+++ tree-vectorizer.c 29 Sep 2004 07:31:24 -0000
@@ -1408,6 +1408,17 @@
return false;
}
vec_mode = TYPE_MODE (vectype);
+ if (GET_MODE_CLASS (vec_mode) != MODE_VECTOR_INT
+ && GET_MODE_CLASS (vec_mode) != MODE_VECTOR_FLOAT)
+ {
+ /* TODO: tree-complex.c sometimes can parallelize operations
+ on generic vectors. We can vectorize the loop in that case,
+ but then we should re-run the lowering pass. */
+ if (vect_debug_details (NULL))
+ fprintf (dump_file, "vector mode not supported by target.");
+ return false;
+ }
+
if (optab->handlers[(int) vec_mode].insn_code == CODE_FOR_nothing)
{
if (vect_debug_details (NULL))