[PATCH] D155155: [RISCV] emit .option directive for functions with target features which differ from module default
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 31 12:36:51 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp:257
+
+ if (STI->hasFeature(Feature.Value) == MCSTI.hasFeature(Feature.Value))
+ continue;
----------------
Should we check this condition first? It's probably cheaper than `RISCVISAInfo::isSupportedExtensionFeature`
================
Comment at: llvm/test/CodeGen/RISCV/riscv-func-target-feature.ll:1
+; RUN: llc -mtriple=riscv64 -mattr=+a,+d,+f,+m -verify-machineinstrs < %s | FileCheck %s
+
----------------
I don't see any tests for disabling an extension?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155155/new/
https://reviews.llvm.org/D155155
More information about the llvm-commits
mailing list