http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41881
--- Comment #10 from irar at gcc dot gnu.org 2011-05-18 11:27:56 UTC --- Author: irar Date: Wed May 18 11:27:51 2011 New Revision: 173856 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173856 Log: PR tree-optimization/41881 * tree-vectorizer.h (struct _loop_vec_info): Add new field reduction_chains along with a macro for its access. * tree-vect-loop.c (new_loop_vec_info): Initialize reduction chains. (destroy_loop_vec_info): Free reduction chains. (vect_analyze_loop_2): Return false if vect_analyze_slp() returns false. (vect_is_slp_reduction): New function. (vect_is_simple_reduction_1): Call vect_is_slp_reduction. (vect_create_epilog_for_reduction): Support SLP reduction chains. * tree-vect-slp.c (vect_get_and_check_slp_defs): Allow different definition types for reduction chains. (vect_supported_load_permutation_p): Don't allow permutations for reduction chains. (vect_analyze_slp_instance): Support reduction chains. (vect_analyze_slp): Try to build SLP instance from reduction chains. (vect_get_constant_vectors): Handle reduction chains. (vect_schedule_slp_instance): Mark the first statement of the reduction chain as reduction. Added: trunk/gcc/testsuite/gcc.dg/vect/O3-pr41881.c trunk/gcc/testsuite/gcc.dg/vect/O3-slp-reduc-10.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vect-loop.c trunk/gcc/tree-vect-slp.c trunk/gcc/tree-vectorizer.h