[PATCH] D114581: [RISCV] Fix a crash in decoding LMUL in VTYPE

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 29 13:50:48 PST 2021


jrtc27 added a comment.

Looking at the vector spec, what about SEW? All of 100-111 are currently reserved. And why's vtypei 11 bits; isn't it 9 in the spec (12 I could understand if zero-extending to fill the I-type value, but 11 is odd)? Maybe I'm missing something, just glancing through.



================
Comment at: llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp:280-281
+                                 const void *Decoder) {
+  // The encoding LMUL=4 is reserved and could be used for something
+  // completely different in the future.
+  if ((Imm & 7) == 4)
----------------
I'd just stop at "is reserved", the latter part of the sentence applies to any reserved encoding so doesn't need special mention, just that it's LMUL=4 (technically vlmul[2:0]; LMUL is the name for the decoded value, vlmul is the actual encoded thing) we're checking for here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114581/new/

https://reviews.llvm.org/D114581



More information about the llvm-commits mailing list