[PATCH] D134599: [RISCV] Add CodeGen support of RISCV zcmp Extension

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 11:33:30 PDT 2023


jrtc27 requested changes to this revision.
jrtc27 added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/test/CodeGen/RISCV/cm_mvas_mvsa.ll:1
+; RUN: llc -mtriple=riscv32 -mattr=+experimental-zcmp -verify-machineinstrs < %s \
+; RUN: | FileCheck %s -check-prefixes=VALID,VALID32
----------------
Please no manual CHECK lines, use update_mir_test_checks.py


================
Comment at: llvm/test/CodeGen/RISCV/cm_mvas_mvsa.ll:2
+; RUN: llc -mtriple=riscv32 -mattr=+experimental-zcmp -verify-machineinstrs < %s \
+; RUN: | FileCheck %s -check-prefixes=VALID,VALID32
+; RUN: llc -mtriple=riscv64 -mattr=+experimental-zcmp -verify-machineinstrs < %s \
----------------
Indent, and why VALID rather than CHECK?


================
Comment at: llvm/test/CodeGen/RISCV/cm_mvas_mvsa.ll:7
+
+; Function Attrs: nounwind
+define dso_local i32 @cmva(i32 %num, i32 %f, i32 %d, i32 %dx) local_unnamed_addr #0 {
----------------
Don't just dump Clang-produced IR into a test, clean it up properly to be minimal and comprehensible. And fix your formatting issues while you're at it (`*nocapture` is incorrect)


================
Comment at: llvm/test/CodeGen/RISCV/push-pop-popret.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; NOTE: Check cm.push/cm.pop.
+; RUN: llc -mtriple=riscv32 -mattr=+experimental-zcmp -verify-machineinstrs < %s \
----------------
?


================
Comment at: llvm/test/CodeGen/RISCV/push-pop-popret.ll:14
+
+; Function Attrs: optnone
+define i32 @foo() {
----------------
Again, clean up your IR. Though this attribute isn't even there, so the comment is worse than unnecessary, it's wrong.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134599



More information about the llvm-commits mailing list