I want to bring this to group's attention as I think I've convinced
myself that Guy's suggestion is the correct path to follow, i.e.,
vsetvli x0, x0, imm
will raise vill if the new SEW'/LMUL' ratio is not the same as the old
SEW/LMUL implying vl might change. Similarly for vsetvl version.
Apart from the debugging motivation that Guy presented, I would add
that this definition effectively removes any read or write of vl from
the instruction, possibly removing hazards and simplifying dependency
tracking and relieving an OoO machine from providing a new rename
register for vl (might still need for vtype).
I could not find any non-esoteric use for the vl-trimming behavior of
the current PoR for larger SEW/LMUL, so given these benefits I move we
adopt the "sets vill for non-iso SEW/LMUL" meaning. The circuit has
to calculate (vsew_new-vlmul_new)!=(vsew_old-vlmul_old) to determine
vill, but now never needs to read or write vl.
I had thought we might be able to reuse the encoding space by
declaring the non-iso SEW/EMUL case "reserved", but this does not
really enable forwards compatibility without mandating a
data-dependent trap as David noted.
As a general optimization guide, software should endeavor to use this
form instead of passing in AVL to avoid the vl update when not
I hope this is one we can resolve on the mailing list to save time in
the next meeting.