This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Vectorize conversions directly
- From: Richard Henderson <rth at redhat dot com>
- To: Dmitry Plotnikov <dplotnikov at ispras dot ru>
- Cc: gcc-patches at gcc dot gnu dot org, IRAR at il dot ibm dot com, rearnsha at arm dot com, dm at ispras dot ru
- Date: Fri, 10 Dec 2010 07:45:59 -0800
- Subject: Re: [PATCH] Vectorize conversions directly
- References: <4CED2DDC.1020604@ispras.ru> <4CED3095.60201@ispras.ru> <4CF02246.4090606@redhat.com> <4D00D204.3080300@ispras.ru>
On 12/09/2010 04:56 AM, Dmitry Plotnikov wrote:
> 2010-12-09 Dmitry Plotnikov <dplotnikov@ispras.ru>
>
> gcc/
> * tree-cfg.c (verify_gimple_assign_unary): Allow vector conversions.
> * tree-vect-stmts.c (supportable_convert_operation): New function.
> (vectorizable_conversion): Call it. Change condition and behavior
> for NONE modifier case.
> * tree-vectorizer.h (supportable_convert_operation): New prototype.
> * tree.h (VECTOR_INTEGER_TYPE_P): New macro.
>
> gcc/config/arm/
> * neon.md (floatv2siv2sf2): New.
> (floatunsv2siv2sf2): New.
> (fix_truncv2sfv2si2): New.
> (fix_truncunsv2sfv2si2): New.
> (floatv4siv4sf2): New.
> (floatunsv4siv4sf2): New.
> (fix_truncv4sfv4si2): New.
> (fix_truncunsv4sfv4si2): New.
>
> gcc/testsuite/
> * gcc.target/arm/vect-vcvt.c: New test.
> * gcc.target/arm/vect-vcvtq.c: New test.
Patch looks generally ok; I'll let another Richard approve the ARM bits.
> + /* First check if we can done conversion directly. */
... if we can do the conversion ...
> +++ b/gcc/testsuite/gcc.target/arm/neon/vect-vcvt.c
> @@ -0,0 +1,28 @@
> +/* { dg-do compile } */
> +/* { dg-options "-O2 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -fdump-tree-vect-details" } */
Missing dg-final bits for this test.
Neither test requires stdarg.h; remove it.
r~