Open moimfeld opened 2 years ago
Similarly, I have clang auto-vectorizing code, and it creates code that uses the vzext.vf4
instruction. But running this on Vicuna results in an illegal instruction. I only see support for vzext.vf2
and vsext.vf2
. Should there be support for v[s|z]ext.vf[4|8]
? Or is it an issue with auto-vectorization or my compiler settings?
Hi @stevobailey
AFAIK, to be compliant with Zve32x
there should be support for *.vf[2|4]
, where vf4
is only legal if SEW
= 32 (because the instruction will extend from elements SEW/4
to SEW
). As you pointed out, there is only support for v[s|z]ext.vf2
at the moment.
If the vzext.vf4
instruction created by your compiler is executed while SEW
= 32 then there should be nothing wrong with your compiler.
Got it, thanks! Then it is a related issue: https://github.com/vproc/vicuna/blob/bda35112a983e9adb4ea8413b0afc2f0d91e7563/rtl/vproc_decoder.sv#L648
Hi @moimfeld @michael-platzer
has this bug been solved or should we use other instructions than vzext.vf2 for now? this instruction is executed correctly by spike but there is "illegal instruction" error when using vicuna for RTL simulation.
thanks
Hi @michael-platzer
When executing the vzext.vf2 instruction on Vicuna the UVM environment issues the following warning (and error):
It looks like Vicuna zero-extends the elements from SEW to 2*SEW while spike zero-extends the elements from SEW/2 to SEW. If I understand the vector specs correctly, then Spike executes the instruction correctly. You can reproduce this error by running the
cvxif_test_direct_issue_75
test in my UVM environment.Sidenote: these are the vector instructions executed during the program vzext_8 (note that SEW = 16):