This is the mail archive of the gcc-patches@gcc.gnu.org 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] |
Hi, This is a resubmission of patch: http://gcc.gnu.org/ml/gcc-patches/2007-01/msg01885.html This patch includes the corrections and enhancement as Richard Guenther has suggested: 1. Generalize the patch to vectorize conversions from integral type to floating-point type, with the same size, and vice versa. Including: change the functions/types/etc. names. 2. Handle case of ncopies>1 (in tree-vect-transform.c (vectorizable_conversion)). 3. Add targethook default function. 4. Add documentation of the target hook in tm.texi. 5. Fix incorrect comment (in tree-vect-transform.c (vectorizable_conversion)). 6. Pass also the tree_code to the target hook. 7. Add tescase for ncopies>1. 8. Add a FIX_TRUNC_EXPR case in tree-vect-generic.c. I think that's all... This patch adds the necessary target hooks and vectorizer changes to support vectorization of statements that include casting from integral type to floating-point type, with the same size, and vice versa, In addition, it implements the int to float conversion hook for altivec. (therefore only int->float was actually tested. In order to test float->int we'd need to implement the missing bits for altivec (for ppc) and/or model the conversions on another target). Testcases of int-to-float conversion (first with ncopies=1. second with ncopies>1) were added. Bootstrapped and tested on the vectorizer testcases on powerpc-linux. Bootstrapped with vectorization enabled and tested on the vectorizer testcases on i386-linux. Full makecheck in progress. OK for mainline, once testing completes? 2007-02-06 Tehila Meyzels <tehila@il.ibm.com> * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_CONVERSION): New target hook. * targhooks.c (default_builtin_vectorized_conversion): New. * targhooks.h (default_builtin_vectorized_function): New declaration. * target.h (struct vectorize): Add builtin_conversion field. * tree-vectorizer.h (type_conversion_vec_info_type): New enum stmt_vec_info_type value. (vectorizable_conversion): New declaration. * tree-vect-analyze.c (vect_analyze_operations): Add vectorizable_conversion call. * target-def.h (TARGET_VECTORIZE_BUILTIN_CONVERSION): New. * tree-vect-transform.c (vectorizable_conversion): New function. (vect_transform_stmt): Add case for type_conversion_vec_info_type. * tree-vect-generic.c (expand_vector_operations_1): Consider correct mode. * config/rs6000/rs6000.c (rs6000_builtin_conversion): New. (TARGET_VECTORIZE_BUILTIN_CONVERSION): Defined. (rs6000_expand_builtin): Add handling a case of ALTIVEC_BUILTIN_VCFUX or ALTIVEC_BUILTIN_VCFSX. (See attached file: vectorize_conversion.txt) : ADDPATCH vectorizer (ssa, loops): Tehila. ----------------------------------------------------------------------------- Tehila Meyzels Tel: 972-4-829-6190 Email: tehila@il.ibm.com
Attachment:
vectorize_conversion.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |