[llvm] [RISCV] Use MnemonicAlias for 'fssr' and 'frsr'. NFC (PR #131877)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 18 11:02:41 PDT 2025
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/131877
None
>From 2350b4541caf55a7cf17c5464aacb056f35c4f8f Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Tue, 18 Mar 2025 10:06:55 -0700
Subject: [PATCH] [RISCV] Use MnemonicAlias for 'fssr' and 'frsr'. NFC
---
llvm/lib/Target/RISCV/RISCVInstrInfoF.td | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
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