This series adds a mode in which we try to vectorise loops once for each supported vector mode combination and then pick the one with the lowest cost. There are only really two patches for that: one to add the feature and another to enable it by default for SVE. However, for it to work as hoped, I also needed to tweak some of the cost calculations.
The series applies on top of two earlier ones: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00119.html https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01822.html Each patch tested individually on aarch64-linux-gnu and the series as a whole on x86_64-linux-gnu. Richard