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

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 25 08:13:10 PST 2021


jrtc27 added inline comments.


================
Comment at: llvm/test/tools/llvm-objdump/RISCV/vsetvli.s:1
+# RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t
+# RUN: llvm-objdump -D --mattr=+experimental-v %t | FileCheck %s
----------------
You don't need a temporary file


================
Comment at: llvm/test/tools/llvm-objdump/RISCV/vsetvli.s:5
+# CHECK:      vsetvli a1, a0, e64, m1, tu, mu
+# CHECK-NEXT: vsetvli a1, a0, e64, <reserved LMUL>, tu, mu
+# CHECK-NEXT: vsetvli a1, a0, e64, mf8, tu, mu
----------------
Is this really the right way to disassemble this? I'd expect it to just be disassembled like any other illegal instruction, not as a real instruction with some arbitrary hard-coded human-readable string injected in the middle of it. For all we know the encoding could be used for something completely different in future.


================
Comment at: llvm/test/tools/llvm-objdump/RISCV/vsetvli.s:8
+
+.data
+.word 0x018575d7
----------------
This section directive is not necessary


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

https://reviews.llvm.org/D114581



More information about the llvm-commits mailing list