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

use of undeclared identifier '__riscv_vloxei32_v_f32m8' #132

Open
nihui opened this issue Sep 2, 2024 · 1 comment
Open

use of undeclared identifier '__riscv_vloxei32_v_f32m8' #132

nihui opened this issue Sep 2, 2024 · 1 comment

Comments

@nihui
Copy link

nihui commented Sep 2, 2024

4ca21d5 origin/rebase-17.0.6

$ ./clang -c test.cpp -o test.o -march=rv64gc_zfh_xtheadvector
test.cpp:23:12: error: use of undeclared identifier '__riscv_vloxei32_v_f32m8'
   23 |     return __riscv_vloxei32_v_f32m8(ptr, bindex, vl);
      |            ^
1 error generated.
#include <riscv_vector.h>

vfloat32m8_t __riscv_vle32_v_f32m8_f32m1(const float* ptr)
{
    const int packn = 4;
    const size_t vl = __riscv_vsetvl_e32m8(packn * 8);

    // NOTE vloxei8_v_f32m8 gets illegal instruction on d1  --- nihui

    // 128bit
    static const uint32_t index_128bit[32] = {
        0, 4, 8, 12,
        0, 4, 8, 12,
        0, 4, 8, 12,
        0, 4, 8, 12,
        0, 4, 8, 12,
        0, 4, 8, 12,
        0, 4, 8, 12,
        0, 4, 8, 12
    };

    vuint32m8_t bindex = __riscv_vle32_v_u32m8(index_128bit, vl);
    return __riscv_vloxei32_v_f32m8(ptr, bindex, vl);
}
@nihui
Copy link
Author

nihui commented Sep 2, 2024

gcc-15 works fine with
./riscv64-unknown-linux-gnu-g++ -c test.cpp -o test.o -march=rv64gc_zfh_xtheadvector

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