Disable unrolling for loops vectorised with non-constant VF
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Mon, 19 Nov 2018 17:58:00 +0000 (17:58 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Mon, 19 Nov 2018 17:58:00 +0000 (17:58 +0000)
commit1fd319753c90f05e026e16c2c83af8f1c6687a5f
treeab4289df64afcccb0a32340e0dcde7d83a62d344
parentc95c552804da90c830941111706e623106a7728a
Disable unrolling for loops vectorised with non-constant VF

This is an alternative to https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00694.html
As richi suggested, this disables unrolling of loops vectorised with variable-length SVE
in the vectoriser itself through the loop->unroll member.

It took me a few tries to get it right, as it needs to be set to '1' to disable unrolling,
the rationale for that mechanism is described in the comment in cfgloop.h.

* tree-vect-loop.c (vect_transform_loop): Disable further unrolling
of the loop if vf is non-constant.

* gcc.target/aarch64/sve/unroll-1.c: New test.

From-SVN: r266281
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/unroll-1.c [new file with mode: 0644]
gcc/tree-vect-loop.c