Skip to content

[RISCV] Non-base vector intrinsics not available via __attribute__((target("arch=..."))) #134962

Open
@dzaima

Description

@dzaima

The code:

#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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions