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_vsseg8e32_v_f32m1x8' #131

Closed
nihui opened this issue Sep 2, 2024 · 3 comments · Fixed by #133
Closed

use of undeclared identifier '__riscv_vsseg8e32_v_f32m1x8' #131

nihui opened this issue Sep 2, 2024 · 3 comments · Fixed by #133

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:15:5: error: use of undeclared identifier '__riscv_vsseg8e32_v_f32m1x8'
   15 |     __riscv_vsseg8e32_v_f32m1x8(&tmp[0], _rl, vl);
      |     ^
test.cpp:16:5: error: use of undeclared identifier '__riscv_vsseg8e32_v_f32m1x8'
   16 |     __riscv_vsseg8e32_v_f32m1x8(&tmp[32], _rh, vl);
      |     ^
2 errors generated.
#include <riscv_vector.h>

void transpose8x8_ps(vfloat32m1_t& _r0l, vfloat32m1_t& _r0h,
                     vfloat32m1_t& _r1l, vfloat32m1_t& _r1h,
                     vfloat32m1_t& _r2l, vfloat32m1_t& _r2h,
                     vfloat32m1_t& _r3l, vfloat32m1_t& _r3h,
                     vfloat32m1_t& _r4l, vfloat32m1_t& _r4h,
                     vfloat32m1_t& _r5l, vfloat32m1_t& _r5h,
                     vfloat32m1_t& _r6l, vfloat32m1_t& _r6h,
                     vfloat32m1_t& _r7l, vfloat32m1_t& _r7h, size_t vl)
{
    float tmp[64];
    vfloat32m1x8_t _rl = __riscv_vcreate_v_f32m1x8(_r0l, _r1l, _r2l, _r3l, _r4l, _r5l, _r6l, _r7l);
    vfloat32m1x8_t _rh = __riscv_vcreate_v_f32m1x8(_r0h, _r1h, _r2h, _r3h, _r4h, _r5h, _r6h, _r7h);
    __riscv_vsseg8e32_v_f32m1x8(&tmp[0], _rl, vl);
    __riscv_vsseg8e32_v_f32m1x8(&tmp[32], _rh, vl);
    float* ptr = (float*)tmp;
    _r0l = __riscv_vle32_v_f32m1(ptr + 0 * 4, vl);
    _r0h = __riscv_vle32_v_f32m1(ptr + 1 * 4, vl);
    _r1l = __riscv_vle32_v_f32m1(ptr + 2 * 4, vl);
    _r1h = __riscv_vle32_v_f32m1(ptr + 3 * 4, vl);
    _r2l = __riscv_vle32_v_f32m1(ptr + 4 * 4, vl);
    _r2h = __riscv_vle32_v_f32m1(ptr + 5 * 4, vl);
    _r3l = __riscv_vle32_v_f32m1(ptr + 6 * 4, vl);
    _r3h = __riscv_vle32_v_f32m1(ptr + 7 * 4, vl);
    _r4l = __riscv_vle32_v_f32m1(ptr + 8 * 4, vl);
    _r4h = __riscv_vle32_v_f32m1(ptr + 9 * 4, vl);
    _r5l = __riscv_vle32_v_f32m1(ptr + 10 * 4, vl);
    _r5h = __riscv_vle32_v_f32m1(ptr + 11 * 4, vl);
    _r6l = __riscv_vle32_v_f32m1(ptr + 12 * 4, vl);
    _r6h = __riscv_vle32_v_f32m1(ptr + 13 * 4, vl);
    _r7l = __riscv_vle32_v_f32m1(ptr + 14 * 4, vl);
    _r7h = __riscv_vle32_v_f32m1(ptr + 15 * 4, 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

@nihui
Copy link
Author

nihui commented Sep 18, 2024

@imkiva 救救 qaq

@imkiva
Copy link
Collaborator

imkiva commented Oct 25, 2024

Sorry for the late reply! After #133 get merged, the code posted here can be compiled successfully: 61bb6e8

ChunyuLiao pushed a commit that referenced this issue Oct 28, 2024
* [Clang][XTHeadVector] Implement zvlsseg unit-stride variant (#131)

* [Clang][XTHeadVector] Add real-world examples (#131)
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

Successfully merging a pull request may close this issue.

2 participants