This patch is part of a proof of concept for vectorising a loop using
scalable vectors. The patch is shared for reference and there is no
expectation for this patch to land in the current form.
- Removed a bunch of asserts that were previously added to prevent vectorization for scalable VFs.
- Steps are scaled by vscale, a runtime value.
- Changes to circumvent the cost-model for now (temporary) so that the cost-model can be implemented separately.
This vectorizes:
void loop(int N, double *a, double *b) { #pragma clang loop vectorize_width(4, scalable) for (int i = 0; i < N; i++) { a[i] = b[i] + 1.0; } }