[llvm] 2f95564 - [RISCV] Simplify RVKUnary_rnum slightly. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 28 21:39:04 PDT 2023
Author: Craig Topper
Date: 2023-07-28T21:36:45-07:00
New Revision: 2f955646713ba6d2f7d96839cb45136da0e0bf2b
URL: https://github.com/llvm/llvm-project/commit/2f955646713ba6d2f7d96839cb45136da0e0bf2b
DIFF: https://github.com/llvm/llvm-project/commit/2f955646713ba6d2f7d96839cb45136da0e0bf2b.diff
LOG: [RISCV] Simplify RVKUnary_rnum slightly. NFC
Added:
Modified:
llvm/lib/Target/RISCV/RISCVInstrInfoZk.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoZk.td b/llvm/lib/Target/RISCV/RISCVInstrInfoZk.td
index b8c0606034c53a..71a88c499e92f5 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoZk.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoZk.td
@@ -74,10 +74,10 @@ let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in
class RVKUnary_rnum<bits<7> funct7, bits<3> funct3, string opcodestr>
: RVInstI<funct3, OPC_OP_IMM, (outs GPR:$rd), (ins GPR:$rs1, rnum:$rnum),
opcodestr, "$rd, $rs1, $rnum">{
- bits<4> rnum;
- let Inst{31-25} = funct7;
- let Inst{24} = 1;
- let Inst{23-20} = rnum;
+ bits<4> rnum;
+ let imm12{11-5} = funct7;
+ let imm12{4} = 0b1;
+ let imm12{3-0} = rnum;
}
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list