| Issue |
56462
|
| Summary |
Pragma `vectorize(disable)` could not avoid vectorization when `-scalable-vectorization=on`
|
| Labels |
clang,
vectorization
|
| Assignees |
|
| Reporter |
fakepaper56
|
The loop will be vectorized with command `clang -target riscv64 -Ofast -S -march=rv64gcv -mllvm -scalable-vectorization=on`.
```
void foo(const int N, const float *restrict a, float *restrict b) {
#pragma clang loop vectorize(disable)
for (int i = 0; i < N; ++i) {
b[i] = a[i] + 1;
}
}
```
Since `vectorize(disable)` mark VF = 1 to the loop, but `-scalable-vectorization=on` make VF = 1 x vscale. The `-scalable-vectorization=` seems stronger than pragma hints. Does `vectorize(disable)` only work without `-scalable-vectorization=on`?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs