[llvm] d32c6dd - [RISCV] Use MnemonicAlias for 'fssr' and 'frsr'. NFC (#131877)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 18 14:04:48 PDT 2025
Author: Craig Topper
Date: 2025-03-18T14:04:45-07:00
New Revision: d32c6dd9be6c243a2891cd9b5149f71da465aed0
URL: https://github.com/llvm/llvm-project/commit/d32c6dd9be6c243a2891cd9b5149f71da465aed0
DIFF: https://github.com/llvm/llvm-project/commit/d32c6dd9be6c243a2891cd9b5149f71da465aed0.diff
LOG: [RISCV] Use MnemonicAlias for 'fssr' and 'frsr'. NFC (#131877)
Added:
Modified:
llvm/lib/Target/RISCV/RISCVInstrInfoF.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoF.td b/llvm/lib/Target/RISCV/RISCVInstrInfoF.td
index 04328151adf8e..97550381a6fb7 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoF.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoF.td
@@ -425,11 +425,9 @@ def : InstAlias<"frcsr $rd", (CSRRS GPR:$rd, SysRegFCSR.Encoding, X0), 2>;
def : InstAlias<"fscsr $rd, $rs", (CSRRW GPR:$rd, SysRegFCSR.Encoding, GPR:$rs)>;
def : InstAlias<"fscsr $rs", (CSRRW X0, SysRegFCSR.Encoding, GPR:$rs), 2>;
-// frsr, fssr are obsolete aliases replaced by frcsr, fscsr, so give them
-// zero weight.
-def : InstAlias<"frsr $rd", (CSRRS GPR:$rd, SysRegFCSR.Encoding, X0), 0>;
-def : InstAlias<"fssr $rd, $rs", (CSRRW GPR:$rd, SysRegFCSR.Encoding, GPR:$rs), 0>;
-def : InstAlias<"fssr $rs", (CSRRW X0, SysRegFCSR.Encoding, GPR:$rs), 0>;
+// frsr, fssr are obsolete aliases replaced by frcsr, fscsr.
+def : MnemonicAlias<"frsr", "frcsr">;
+def : MnemonicAlias<"fssr", "fscsr">;
def : InstAlias<"frrm $rd", (CSRRS GPR:$rd, SysRegFRM.Encoding, X0), 2>;
def : InstAlias<"fsrm $rd, $rs", (CSRRW GPR:$rd, SysRegFRM.Encoding, GPR:$rs)>;
More information about the llvm-commits
mailing list