re PR tree-optimization/78899 (Vestorized loop with optmized mask stores motion is...
authorJakub Jelinek <jakub@redhat.com>
Mon, 9 Jan 2017 20:10:23 +0000 (21:10 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 9 Jan 2017 20:10:23 +0000 (21:10 +0100)
commitcb330ba582c9b175bb0c2debaba075a8af8d0b95
tree6dd4df32ad5eb0ca2c76ee47cb1d2ae5a80687ef
parent47d5beb478d39937b8068410101241ae806adc25
re PR tree-optimization/78899 (Vestorized loop with optmized mask stores motion is completely deleted after r242520.)

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.

From-SVN: r244238
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