Hi,
Currently the #pragma clang loop unroll(disable)
directive has no impact on loop vectorizer’s decision to interleave or not. I think it would make sense to avoid interleaving when the user specifically asked for no unrolling. I’m just wondering what people think about having #pragma clang loop unroll(disable)
or #pragma clang loop unroll_count(1)
imply #pragma clang loop interleave(disable)
?
cat tmp.c
void foo(int n, int * A)
{
#pragma clang loop unroll(disable)
for (int i = 0; i < n; i++)
A[i] = i;
}
clang -O3 tmp.c -S -emit-llvm -mllvm -debug-only=loop-vectorize 2>&1 | grep -i interleave
LV: Interleave Count is 12
Bardia Mahjour
Compiler Optimizations
IBM Toronto Software Lab