[PATCH] D146663: [RISCV] Add .insn support compressed formats.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 22 14:54:06 PDT 2023


MaskRay added inline comments.


================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:2515
+
+  return Format == "cr" || Format == "ci" || Format == "ciw" || Format == "css" || Format == "cl" || Format == "cs" || Format == "ca" || Format == "cb" || Format == "cj";
+}
----------------
jrtc27 wrote:
> Wrap?
Consider `llvm::is_contained({...}, Format)` to reduce the length and therefore improve readability.


================
Comment at: llvm/test/MC/RISCV/insn_c.s:2
+# RUN: llvm-mc %s -triple=riscv32 -mattr=+f,+c -riscv-no-aliases -show-encoding \
+# RUN:     | FileCheck -check-prefixes=CHECK-ASM %s
+# RUN: llvm-mc %s -triple riscv64 -mattr=+f,+c -riscv-no-aliases -show-encoding \
----------------
`--check-prefix` instead of `(es)` if there is just one prefix.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146663



More information about the llvm-commits mailing list