llvm-project
llvm-project copied to clipboard
[RISCV] wrong elements number of vector type in debuginfo
the debug info of vfloat16m1_t variable in rv32 (VLEN = 1024) is following:
(stc-gdb) p vector_d
$3 = {1.0586 <repeats 65 times>}
(stc-gdb) p &vector_d
$4 = (vfloat16m1_t *) 0xc013fd80
(stc-gdb) pt vector_d
type = __fp16 __attribute__ ((vector_size(65)))
I think the number of vector elements should be 64,which is calculated by VLEN/8/sizeof(fp16) * LMUL .
And I have provided a patch to fix this problem : https://reviews.llvm.org/D115430
this problem has fixed by commit:https://reviews.llvm.org/rG9c11e952868342dfbf0efedd246dac6191ee98d7
@llvm/issue-subscribers-debuginfo
@llvm/issue-subscribers-backend-risc-v