Issue 134962
Summary [RISCV] Non-base vector intrinsics not available via `__attribute__((target("arch=...")))`
Labels new issue
Assignees
Reporter dzaima
    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
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to