[llvm] d0d54fa - [RISCV] Move "let rd = 0" into class body. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 15:08:00 PDT 2024


Author: Craig Topper
Date: 2024-10-14T15:07:45-07:00
New Revision: d0d54fa066d224d1338f65b6e048bdff64feca37

URL: https://github.com/llvm/llvm-project/commit/d0d54fa066d224d1338f65b6e048bdff64feca37
DIFF: https://github.com/llvm/llvm-project/commit/d0d54fa066d224d1338f65b6e048bdff64feca37.diff

LOG: [RISCV] Move "let rd = 0" into class body. NFC

We usually override operand related fields in the class body instead
of at the top level.

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVInstrInfoC.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInstrInfoC.td b/llvm/lib/Target/RISCV/RISCVInstrInfoC.td
index 7d742322b42969..d468fb2a6c494c 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoC.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoC.td
@@ -401,9 +401,11 @@ def C_SD : CStore_rri<0b111, "c.sd", GPRC, uimm8_lsb000>,
   let Inst{6-5} = imm{7-6};
 }
 
-let rd = 0, imm = 0, hasSideEffects = 0, mayLoad = 0, mayStore = 0 in
+let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in
 def C_NOP : RVInst16CI<0b000, 0b01, (outs), (ins), "c.nop", "">,
             Sched<[WriteNop]> {
+  let rd = 0;
+  let imm = 0;
   let Inst{6-2} = 0;
 }
 
@@ -639,9 +641,9 @@ def C_UNIMP : RVInst16<(outs), (ins), "c.unimp", "", [], InstFormatOther>,
 let Predicates = [HasStdExtCOrZca, HasRVCHints], hasSideEffects = 0, mayLoad = 0,
     mayStore = 0 in {
 
-let rd = 0 in
 def C_NOP_HINT : RVInst16CI<0b000, 0b01, (outs), (ins simm6nonzero:$imm),
                             "c.nop", "$imm">, Sched<[WriteNop]> {
+  let rd = 0;
   let Inst{6-2} = imm{4-0};
 }
 


        


More information about the llvm-commits mailing list