[PATCH] D106347: [PoC][RISCV] Encode arch information in a new module flag meatadata 'riscv-isa-features'.

Jessica Clarke via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 22 10:46:11 PDT 2021


jrtc27 added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/riscv-isa-features.ll:1
+; RUN: llc -o - < %s | FileCheck %s
+; -mattr option would overwrite target-feature and module flag riscv-isa-features
----------------
Use update_llc_test_checks for these.


================
Comment at: llvm/test/CodeGen/RISCV/riscv-isa-features.ll:2
+; RUN: llc -o - < %s | FileCheck %s
+; -mattr option would overwrite target-feature and module flag riscv-isa-features
+; RUN: llc -o - -mattr=+f,+d < %s | FileCheck %s -check-prefix=ISA-F-D
----------------
It's not overriding. It's just that #0 doesn't include -f,-d so applying #0 atop the default target-features keeps the default f and d features.


================
Comment at: llvm/test/CodeGen/RISCV/riscv-isa-features.ll:3
+; -mattr option would overwrite target-feature and module flag riscv-isa-features
+; RUN: llc -o - -mattr=+f,+d < %s | FileCheck %s -check-prefix=ISA-F-D
+; RUN: llc --filetype=obj -o - < %s | llvm-readelf -A - \
----------------
CHECK and ISA-F-D are not consistent with the check prefixes used in other RISC-V tests.


================
Comment at: llvm/test/CodeGen/RISCV/riscv-isa-features.ll:29
+
+attributes #0 = { "target-features"="+64bit,+a,+c,+m"}
+attributes #1 = { "target-features"="+64bit,+a,+c,+d,+f,+m"}
----------------
Space before }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106347



More information about the cfe-commits mailing list