[llvm] [RISCV] Remove unnecessary NoHasStdExtZicfiss Predicate from cmop.1 and cmop.5. NFC (PR #88822)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 17:25:37 PDT 2024
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/88822
I'm not sure what this was supposed do. Maybe it was for the disassembler, but that should be managed through DecoderNamespace.
So let's remove it and simplify the code.
>From b695dde6dc593b047b3b123e96dfff9b59488a45 Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Mon, 15 Apr 2024 17:20:28 -0700
Subject: [PATCH] [RISCV] Remove unnecessary NoHasStdExtZicfiss Predicate from
cmop.1 and cmop.5. NFC
I'm not sure what this was supposed do. Its on the instruction and
not a pattern so could only affect assembly and not codegen.
NoHasStdExtZicfiss doesn't have an AssemblerPredicate associated with
it so it doesn't affect the assembler either.
Remove it and simplify the code.
---
llvm/lib/Target/RISCV/RISCVInstrInfoZcmop.td | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoZcmop.td b/llvm/lib/Target/RISCV/RISCVInstrInfoZcmop.td
index dd13a07d606d04..65091aad91003d 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoZcmop.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoZcmop.td
@@ -20,13 +20,7 @@ class CMOPInst<bits<3> imm3, string opcodestr>
let Inst{12-11} = 0;
}
-// CMOP1, CMOP5 is used by Zicfiss.
-let Predicates = [HasStdExtZcmop, NoHasStdExtZicfiss] in {
- def CMOP1 : CMOPInst<0, "cmop.1">, Sched<[]>;
- def CMOP5 : CMOPInst<2, "cmop.5">, Sched<[]>;
-}
-
-foreach n = [3, 7, 9, 11, 13, 15] in {
+foreach n = [1, 3, 5, 7, 9, 11, 13, 15] in {
let Predicates = [HasStdExtZcmop] in
def CMOP # n : CMOPInst<!srl(n, 1), "cmop." # n>, Sched<[]>;
}
More information about the llvm-commits
mailing list