Index: testsuite/ChangeLog.autovect =================================================================== *** testsuite/ChangeLog.autovect (revision 127372) --- testsuite/ChangeLog.autovect (working copy) *************** *** 1,3 **** --- 1,7 ---- + 2007-08-12 Dorit Nuzman + + * gcc.dg/vect/vect-outer-2d.c: New test. + 2007-08-12 Ira Rosen * gcc.dg/vect/slp-37.c: New. Index: testsuite/gcc.dg/vect/vect-outer-2d.c =================================================================== *** testsuite/gcc.dg/vect/vect-outer-2d.c (revision 0) --- testsuite/gcc.dg/vect/vect-outer-2d.c (revision 0) *************** *** 0 **** --- 1,41 ---- + /* { dg-require-effective-target vect_float } */ + #include + #include "tree-vect.h" + + #define N 40 + float image[N][N][N+1] __attribute__ ((__aligned__(16))); + + void + foo (){ + int i,j,k; + + for (k=0; k + + * tree-vect-analyze.c (vect_analyze_loop_form): Check that the + inner-loop bound is invariant in the outer-loop (for outer-loop + vectorization). + 2007-08-12 Ira Rosen * tree-vect-analyze.c (vect_get_and_check_slp_defs): Add new argument. Index: tree-vect-analyze.c =================================================================== *** tree-vect-analyze.c (revision 127372) --- tree-vect-analyze.c (working copy) *************** vect_analyze_loop_form (struct loop *loo *** 3785,3790 **** --- 3785,3800 ---- return NULL; } + if (!expr_invariant_in_loop_p (loop, + LOOP_VINFO_NITERS (inner_loop_vinfo))) + { + if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS)) + fprintf (vect_dump, + "not vectorized: inner-loop count not invariant."); + destroy_loop_vec_info (inner_loop_vinfo, true); + return NULL; + } + if (loop->num_nodes != 5) { if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))