Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all documented RVV 0.7.1 intrinsics supported #8

Open
mshabunin opened this issue Aug 22, 2023 · 0 comments
Open

Not all documented RVV 0.7.1 intrinsics supported #8

mshabunin opened this issue Aug 22, 2023 · 0 comments

Comments

@mshabunin
Copy link

mshabunin commented Aug 22, 2023

We have found that some of documented (1) intrinsics are not supported. Please find the reproducer code below. Enabling CASE1 or CASE2 results in an error. Is the documentation wrong or is it a compiler problem?

#include <riscv_vector.h>

#define CASE1 0
#define CASE2 0

int main()
{
#if CASE1    
    // does not work
    // snippet.cpp:16:26: error: 'vlmul_trunc_v_i64m2_i64m1' was not declared in this scope; did you mean 'vget_v_i64m2_i64m1'?
    //   12 |         vint64m1_t dst = vlmul_trunc_v_i64m2_i64m1(src);
    //      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~
    //      |                          vget_v_i64m2_i64m1
    {
        vint64m2_t src;
        vint64m1_t dst = vlmul_trunc_v_i64m2_i64m1(src);
    }

#endif


#if CASE2
    // works
    {
        int8_t data[1000] = {0};
        vuint8m1_t bindex;
        vint8m1_t dst = vloxei8_v_i8m1 (data, bindex, 8);
    }

    // does not work
    // snippet.cpp:37:25: error: 'vloxei32_v_i8m1' was not declared in this scope; did you mean 'vloxei32_v_i32m1'?
    //   18 |         vint8m1_t dst = vloxei32_v_i8m1 (data, bindex, 8);
    //      |                         ^~~~~~~~~~~~~~~
    //      |                         vloxei32_v_i32m1
    {
        int8_t data[1000] = {0};
        vuint32m4_t bindex;
        vint8m1_t dst = vloxei32_v_i8m1 (data, bindex, 8);
    }
#endif
    return 0;
}

Compilation command:

/opt/riscv64-linux-x86_64-20220906/bin/riscv64-unknown-linux-gnu-g++ -march=rv64gcv0p7 -c snippet.cpp 

Compiler version:

riscv64-unknown-linux-gnu-g++ (Xuantie-900 linux-5.10.4 glibc gcc Toolchain V2.6.1 B-20220906) 10.2.0

RVV intrinscs documentation found here: https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource/1836682/1638774209491/Xuantie+900+Series+RVV-0.7.1+Intrinsic+Manual.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant