<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/134962>134962</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[RISCV] Non-base vector intrinsics not available via `__attribute__((target("arch=...")))`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dzaima
</td>
</tr>
</table>
<pre>
The code:
```c
#include<riscv_vector.h>
__attribute__((target("arch=+v,+zvfh")))
vfloat16m1_t test_Zvfh(vfloat16m1_t op1, vfloat16m1_t op2) {
return __riscv_vfadd_vv_f16m1(op1, op2, 4);
}
__attribute__((target("arch=+v,+zvfbfwma")))
vfloat32m2_t test_Zvfbfwma(vfloat32m2_t vd, vbfloat16m1_t vs1, vbfloat16m1_t vs2) {
return __riscv_vfwmaccbf16_vv_f32m2(vd, vs1, vs2, 4);
}
__attribute__((target("arch=+v,+zvkb")))
vuint8mf8_t test_Zvkb(vuint8mf8_t op1, vuint8mf8_t op2) {
return __riscv_vandn_vv_u8mf8(op1, op2, 4);
}
__attribute__((target("arch=+v,+zvbc")))
vuint64m1_t test_Zvbc(vuint64m1_t op1, vuint64m1_t op2) {
return __riscv_vclmul_vv_u64m1(op1, op2, 4);
}
```
does not compile without `-march=...`, but it should, as it does for base `v` intrinsics.
https://godbolt.org/z/qPzEsT4dd
related: #56592, #121603
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0lM-PozYUx_-ax8UaZJ6BwIFDJtlIvVRVu-qhF2RsE9waPMWGUfPXV3bYLklH2qpqJUuJ3y_74-_jcef0dVKqgeIVinPCFz_YuZE3rkeedFb-0XweFBFWKmBHoHGV9L5E2CDTkzBL8J9m7cTarkp4O6cDsE9Aj23LvZ91t3jVtoAVYOX5fFU-_kc-iwHYGfB1BTwBvt7WfgBEwHpb9Lj2xnKflWPWeuKV8-0vMah6cNi3DPBEnmyhEIHDK9AjIYTMyi_zRNp2u2rPpWzXte1DAmC1FYl5J5KH81nIhcP5Dv8vcLr-feQfIjEccYe0BVYPzlVGqm6PtbrsI-Oe9W-g7yMXouuzMuKG4uGke_GtnPvvoH_rnoEXPflq7KuvvCGm2tu_KPhgehDwmYpPcgo8Swj_f-TrxEckZb5vxhBT7e17kr9M32hFYcbFRJiQ8W2YL1_hHUxa5chkPRF2fNNGkXftB7t4AiV9GTeuNE1DAp5It3iiPXGDXUzsAe7CPlbp7Uw67lRIXaGkRE9-1pPTwqX3wwbv31yYB3gBvFyt7KzxqZ2vgJcb4OX3H26f3Odcynv4rAz3SgI7EkBWlEUdiQBZhllJWSIbJmtW80Q12SHPsxILWidD0x8YozVVPJdVnjOuhFBciQNHWVeVpIlukGJBc1rTjBW0TjlHTsuMyp5VtKwLyKkauTapMesYbpho5xbVZCyvS0wM75RxcfghTuqdRG8QvDgncxOSXrrl6iCnRjvvvpbx2ps4NX_87qfTz1Ccyfd2eonPdp9_u1eLuvCVa8M7o8iqeXjaf9aKQbJ9_5U0WWbTPCmg_bB0qbAj4CVccft5eZvtr0p4wEsEc4CXjXxt8M8AAAD__98V0CM">