<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56462>56462</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Pragma `vectorize(disable)` could not avoid vectorization when `-scalable-vectorization=on`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang,
vectorization
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
fakepaper56
</td>
</tr>
</table>
<pre>
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`?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNU8GOmzAQ_RpzGYGMCSQcOGw2yrGttFXvxjbgrsGRbUi3X98xyaaKqk03suLx2DPvzcyjtfKt-T4oMNae4KyNgVbBokSwTv9WEl1hAGHHkU8SSEWF4VMPaeCuVwGc9mKpNpB-7bgPkL5AOnInBlIcHPp7saDDmGWE1AtueGtU-p6cB20nfIh_Fc0IPRD6hNZ1rcfFagmdtYTthJ0QQE8BvhD2DJdjZywPQNiTUz44LQLwePmvuyWsBrLdX1FYcXK8Hzlcqllrv9WMYFL7SBWDLgGAJBwm3EV8DUgaKCn2q_mMhNAkbI9L3-EA_lpSorc8rEH8dmB7yDHs_R3ZHq7UbsZ9J170JBTEAXzAs6KAnX-FH8cVKYdgIVznGnvSziFG_2cMmONV_c3xC5b4XmUQJfIwPAZ7pUYP2HI79cohPJ_g2ugBO-czOFjlHxdhJ_MGZ4uVROVZZP0J2qQ4JrIpZF3UPAk6GNV8u-A-xBJ2NhImi7JZlXaXG86Dmj6BnczONEMIJ08KVNYRV4_M5zbDrwYPUf3XLT05-xNz4FF7PyuPRlltKpYMTSHqgotyU25byUtZC8F3uaxpJ-m2yGWeIAVlfIMKIoytusU9Tha3e2LoLg-JbhhljG5zSnOEKLJd3knG67biMa0oyYaqkWuTRWqZdX3impVlO_ceL432OLLbJfde95NSKwPMz2ccj2s6FMyJn5Qrq2Qtqlkr-gN1-l1P">