<div dir="ltr"><div>There aren't really any instructions for doing this in the ISA. Solutions I can think of are rounding vl to the next multiple of 8 and storing it to a uint8_t using vse8. Then reading it back by looping over the array and looking at all 8 bits of each uint8_t. Or you could use vmerge to turn into a vuint8m1_t vector of 1 and 0.</div><div><br></div><div>Perhaps if you shared your use case I might be able to come up with something else.</div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 8, 2021 at 7:23 PM Shao-Ce Sun via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>Hi All,</div><div> I have a question about RISC-V V, that is how to read each bit of vbool8_t individually, for example:</div><div> vbool8_t A;</div><div> bool B[8] = A;</div><div style="text-align:right">Thanks!</div></div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>