[Libre-soc-dev] Vertical-First mode with predicates

lkcl luke.leighton at gmail.com
Fri Jun 17 21:14:27 BST 2022


https://bugs.libre-soc.org/show_bug.cgi?id=862

there's a bit of a problem with VF Mode when it comes to Predicates.  Horizontal-First, no problem: read the predicate, execute the entire loop using each bit of the predicate, which has *already been read*

Vertical-First it all goes to hell because there will be a loop, and there will be multiple instructions like this:

setvl VF=1
loop:
ld r3 # get predicate
sv.addi/m=r3 r8.v, r8.v, 1
ld r3 # get ANOTHER vector predicate
sv.subi/m=r3 r8.v, r16.v, 2
svstep.
bnz loop

which all looks perfectly normal until someone tries this:

setvl VF=1
loop:
ld r3 # get predicate
sv.addi/m=r3 r8.v, r8.v, 1
addi r3, r3, 5
sv.addi/m=r3 r8.v, r8.v, 1
svstep.
bnz loop

at which point the hardware melts from overload on the dual role.

thoughts appreciated.

l 


More information about the Libre-soc-dev mailing list