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] |
When there are types of different sizes in the loop, the smallest data type determines the Vectorization Factor (VF), and operations on larger data types need to be duplicated ("unrolled") VF/nunits times, where nunits is the number of elements of the respective data-type that can fit in a vector. For outer-loop vectorization this mechanism is supported when the duplication is required in the outer-loop, but not when it is required in the inner-loop. This patch adds support towards that. For most cases (vectorizable_conversion, vectorizable_opration, vectorizable_demotion, vectorizable_promotion, vectorizable_call) the same support we already have for innermost-loop vectorization works also in the context of outer-loop vectorization, so we only had to remove the check that blocked this feature. For loads, stores, inductions and reductions the support is different. Out of these this patch handles duplication for reductions. Bootstrapped with vectorization enabled and passed the vectorizer testcases on powerpc970. Bootstrapped and passed the vectorizer testcases on i386-linux. To be committed once full regression testing passes on i386-linux. dorit 2008-08-12 Dorit Nuzman <dorit@il.ibm.com> * tree-vect-transform.c (vect_create_epilog_for_reduction): Takes an additional argument. Support reduction when duplication is needed due to data-types of different sizes in the loop. (get_initial_def_for_induction): Fix printout. (vect_get_vec_def_for_stmt_copy): Support case where the vec_stmt_for_operand is a phi node. (vectorizable_reduction): Support reduction when duplication is needed due to data-types of different sizes in the loop. (vectorizable_call): Remove restriction to not vectorize in case we have data-types of different sizes in the loop. (vectorizable_conversion): Likewise. (vectorizable_operation): Likewise.. (vectorizable_type_demotion): Likewise. (vectorizable_type_promotion): Likewise. (vectorizable_induction): Add restriction to not vectorize in case we have data-types of different sizes in the loop. 2008-08-12 Dorit Nuzman <dorit@il.ibm.com>. * gcc.dg/vect/vect-outer-4g.c: Change loop bound. * gcc.dg/vect/vect-outer-4k.c: Likewise. * gcc.dg/vect/vect-outer-4l.c: Likewise. * gcc.dg/vect/vect-outer-4f.c: Likewise. * gcc.dg/vect/vect-outer-4a.c: Vectorizable. Remove obsolete comment. * gcc.dg/vect/vect-outer-4i.c: Likewise. * gcc.dg/vect/vect-outer-4b.c: Likewise. * gcc.dg/vect/vect-outer-4j.c: Likewise. (See attached file: outerloop.multitypes.txt)
Attachment:
outerloop.multitypes.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |