llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[RISCV] wrong elements number of vector type in debuginfo

Open Luhaocong opened this issue 4 years ago • 3 comments

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

Luhaocong avatar Dec 16 '21 06:12 Luhaocong

this problem has fixed by commit:https://reviews.llvm.org/rG9c11e952868342dfbf0efedd246dac6191ee98d7

Luhaocong avatar Dec 22 '21 06:12 Luhaocong

@llvm/issue-subscribers-debuginfo

llvmbot avatar Jan 19 '22 15:01 llvmbot

@llvm/issue-subscribers-backend-risc-v

llvmbot avatar Jan 19 '22 15:01 llvmbot