]> git.ipfire.org Git - thirdparty/gcc.git/commit
Disable unrolling for loops vectorised with non-constant VF
authorktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Nov 2018 17:58:00 +0000 (17:58 +0000)
committerktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Nov 2018 17:58:00 +0000 (17:58 +0000)
commitf7289f563a5e447ac21a5901ed75aad0dbd37732
treeab4289df64afcccb0a32340e0dcde7d83a62d344
parentf2e20cc0ae6d8f3c02cc1b65c71cf64c0f6806e5
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266281 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/unroll-1.c [new file with mode: 0644]
gcc/tree-vect-loop.c