PR tree-optimization/78899
commitccd0a9f9827e8446261698be5f2f5649309b77b8
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Jan 2017 20:10:23 +0000 (9 20:10 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Jan 2017 20:10:23 +0000 (9 20:10 +0000)
tree6dd4df32ad5eb0ca2c76ee47cb1d2ae5a80687ef
parentf25b3fefc77e230fb8c8ac0367c041ea165e46ec
PR tree-optimization/78899
* tree-if-conv.c (version_loop_for_if_conversion): Instead of
returning bool return struct loop *, NULL for failure and the new
loop on success.
(versionable_outer_loop_p): Don't version outer loop if it has
dont_vectorized bit set.
(tree_if_conversion): When versioning outer loop, ensure
tree_if_conversion is performed also on the inner loop of the
non-vectorizable outer loop copy.
* tree-vectorizer.c (set_uid_loop_bbs): Formatting fix.  Fold
LOOP_VECTORIZED in inner loop of the scalar outer loop and
prevent vectorization of it.
(vectorize_loops): For outer + inner LOOP_VECTORIZED, ensure
the outer loop vectorization of the non-scalar version is attempted
before vectorization of the inner loop in scalar version.  If
outer LOOP_VECTORIZED guarded loop is not vectorized, prevent
vectorization of its inner loop.
* tree-vect-loop-manip.c (rename_variables_in_bb): If outer_loop
has 2 inner loops, rename also on edges from bb whose single pred
is outer_loop->header.  Fix typo in function comment.

* gcc.target/i386/pr78899.c: New test.
* gcc.dg/pr71077.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244238 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr71077.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr78899.c [new file with mode: 0644]
gcc/tree-if-conv.c
gcc/tree-vect-loop-manip.c
gcc/tree-vectorizer.c