Hi all, 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. Bootstrapped and tested on aarch64-none-linux-gnu. Is this ok for trunk? Thanks, Kyrill 2018-11-15 Kyrylo Tkachov * tree-vect-loop.c (vect_transform_loop): Disable further unrolling of the loop if vf is non-constant. 2018-11-15 Kyrylo Tkachov * gcc.target/aarch64/sve/unroll-1.c: New test.