<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/111642>111642</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
RVV instruction still generated even when auto vectorization are totally disabled
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
fanghuaqi
</td>
</tr>
</table>
<pre>
Hello there, I met a strange issue when using LLVM/Clang to build c code with RISC-V Vector extension enabled, see test code here https://godbolt.org/z/GreE5bTWo
I am expecting when passing `-O2 -march=rv64imafdc_zfh_zvfh_zve64f -mabi=lp64d -fno-vectorize -fno-slp-vectorize` compiler options, auto vectorization will be totally disabled for RISC-V, but I can still see many RVV instructions generated such as `vsetivli` and `vle64`.

Is above behavior expected? If yes, If I want to fully disable any vector instruction generated, how to achieve it.
Thanks
Huaqi
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8k0GPpDYQhX-N-1KiBcYwzYHD7nTItrRRpM2qc1yVTQFOjE1sQ-_Mr49MTzSzkygXt9vyo6o-v4ch6NEStaz6yKrzAdc4Od8OaMdpxb_0Qbr-qf1ExjiIE3li_BEuMFMEhBA92pFAh7AS3CaysAZtR_j8-foL492jQTtCdCBXbXpQoFxPcNNxgi-X3x6zK1xJReeBvkeyQTsLZFEa6lOVQASRQryrUm2YYlwCKz8w3jHeja6XzsSj8yPj3TPj3c-efqrk198dy88s_3BfL4Az0PeFVEy97W0uaW47Aqvz7FcO2YxeTaw8-60WesahV9-eh-nb87YvVIsh3ZGalWez1KIHyAbrsm1vXz_T_W8wy-sRq3NQbl60IQ9uidrZkMbCNTr45xamY7hpY0ASRBfRmCfoddgpwOD8C6mklGuECyi0EGJSJEAz2if4cr2CtiH6Ve1lYCRLHiP1EFY1AYY06BYo6s3o1Bjafj8yVAtW58e3vBgvWPVRzzgSq86Mn95R13Fa5VG5mfFuDeQzjBHVNJONgfEOQ6B9I2WeDxVWmXqQRSaKvs6a4VRmvKhFI2igU1kz3vzwVAFQuo1A0oSb3p2R3o16VnZwGeCJdoaXAS5wQxuTuYb1DTNIPO503yJ5JZLkk7slIapJ00ag4w_zf53Q_hnu-097Bvq27JuywQO1xQM_iaquCn6YWqEe-rpRjSwlL0txGqoCSxS5lKfhpPjDQbc856LI8yavxankx7ogIXlT9U1OtRAlEznNqM3RmG1ORj7sWWqLoqgFPxiUZMKeTc4t3e5JY5ynqPo2iTK5joGJ3OgQw-tnoo6G2nfGePHNqztoI3sPxH-4Ev2_HXlYvWn_xw-p_stPtnj3B6nIeLd3nSzxMtbW8r8DAAD__6MweJM">