Open tony-cole opened 3 years ago
In addition to the slide1down instruction in issue #671 and the existing slideup/down instructions:
vslideup.vx vslideup.vi vslidedown.vx vslidedown.vi
It would be useful to have rotation as well, e.g.:
vrotateup.vx vrotateup.vi vrotatedown.vx vrotatedown.vi
where they operate as follows:
vrotateup.vx vd, vs2, rs1, vm # vd[(i+rs1) % vl] = vs2[i] vrotateup.vi vd, vs2, uimm[4:0], vm # vd[(i+uimm) % vl] = vs2[i] vrotatedown.vx vd, vs2, rs1, vm # vd[i] = vs2[(i+rs1) % vl] vrotatedown.vi vd, vs2, uimm[4:0], vm # vd[i] = vs2[(i+uimm) % vl]
I know I can use a vrgather.vv instruction to do this, but that needs setting up which wastes (a lot of) CPU time and a grouped vector register.
I've have a way to do this with Tail Undisturbed and a few instructions, see: https://github.com/riscv/riscv-v-spec/issues/664#issuecomment-836810691
Although a dedicated instruction would be faster.
In addition to the slide1down instruction in issue #671 and the existing slideup/down instructions:
It would be useful to have rotation as well, e.g.:
where they operate as follows:
I know I can use a vrgather.vv instruction to do this, but that needs setting up which wastes (a lot of) CPU time and a grouped vector register.