Re: [PATCH v4]middle-end: Apply loop->unroll directly in vectorizer

2025-06-23 Thread Richard Biener
On Mon, 23 Jun 2025, Tamar Christina wrote: > Consider the loop > > void f1 (int *restrict a, int n) > { > #pragma GCC unroll 4 requested > for (int i = 0; i < n; i++) > a[i] *= 2; > } > > Which today is vectorized and then unrolled 3x by the RTL unroller due to the > use of the pragma. T

[PATCH v4]middle-end: Apply loop->unroll directly in vectorizer

2025-06-23 Thread Tamar Christina
Consider the loop void f1 (int *restrict a, int n) { #pragma GCC unroll 4 requested for (int i = 0; i < n; i++) a[i] *= 2; } Which today is vectorized and then unrolled 3x by the RTL unroller due to the use of the pragma. This is unfortunate because the pragma was intended for the scalar l