This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/37150] vectorizer issue
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Aug 2008 15:55:11 -0000
- Subject: [Bug middle-end/37150] vectorizer issue
- References: <bug-37150-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2008-08-18 15:55 -------
Note that there is no loop left on the trunk for the testcase, but after
the vectorizer it is all unrolled completely (unvectorized, of course).
Again this looks like missing vectorization of scalar code.
Note that the first complete unrolling pass unrolls loops that result in
smaller code. This interferes with vectorization in your case, so can
you try
Index: tree-ssa-loop-ivcanon.c
===================================================================
*** tree-ssa-loop-ivcanon.c (revision 139200)
--- tree-ssa-loop-ivcanon.c (working copy)
*************** tree_unroll_loops_completely (bool may_i
*** 359,374 ****
FOR_EACH_LOOP (li, loop, LI_ONLY_INNERMOST)
{
! if (may_increase_size && maybe_hot_bb_p (loop->header)
! /* Unroll outermost loops only if asked to do so or they do
! not cause code growth. */
! && (unroll_outer
! || loop_outer (loop_outer (loop))))
ul = UL_ALL;
else
ul = UL_NO_GROWTH;
! changed |= canonicalize_loop_induction_variables
! (loop, false, ul, !flag_tree_loop_ivcanon);
}
if (changed)
--- 359,378 ----
FOR_EACH_LOOP (li, loop, LI_ONLY_INNERMOST)
{
! /* Unroll outermost loops only if asked to do so. */
! if (!unroll_outer
! && !loop_outer (loop_outer (loop)))
! ul = UL_SINGLE_ITER;
! else if (may_increase_size && maybe_hot_bb_p (loop->header))
ul = UL_ALL;
else
ul = UL_NO_GROWTH;
! if (canonicalize_loop_induction_variables
! (loop, false, ul, !flag_tree_loop_ivcanon))
! {
! statistics_counter_event (cfun, "Loops completely unrolled", 1);
! changed = true;
! }
}
if (changed)
?
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37150