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

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 25 05:39:43 PST 2021


benshi001 marked an inline comment as done.
benshi001 added inline comments.


================
Comment at: llvm/test/tools/llvm-objdump/RISCV/vsetvli.test:1
+// RUN: llvm-objdump -D --mattr=+experimental-v %p/Inputs/vsetvli.o | FileCheck --check-prefix=CHECK %s
+
----------------
jhenderson wrote:
> I'm not at all familiar with what's going on in the disassembly, so can't review the rest of this patch, but could you use llvm-mc to create the test input file at runtime, rather than checking in an opaque binary?
> 
> Also, I recommend:
> a) Use the same comment markers for your RUN and CHECK lines (I prefer '#').
> b) Don't bother checking the addresses or raw bytes, unless they're important to the test.
> c) If you're just disassembling a regular function, use -d rather than -D.
> d) Don't add `--check-prefix=CHECK`: it's the default, so there's no need to explicitly specify it.
1. I have changed all markers to `#`

2. I have eliminated the binary test file, and replaced it with text form.

3. I have to use "-D" than "-d", since the llvm-objdump crash can only be triggered by "-D"

4. I have eliminated the explicit "--prefix=CHECK"



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

https://reviews.llvm.org/D114581



More information about the llvm-commits mailing list