Skip to content

Commit d0d54fa

Browse files
committed
[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.
1 parent 58bf78c commit d0d54fa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoC.td

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,11 @@ def C_SD : CStore_rri<0b111, "c.sd", GPRC, uimm8_lsb000>,
401401
let Inst{6-5} = imm{7-6};
402402
}
403403

404-
let rd = 0, imm = 0, hasSideEffects = 0, mayLoad = 0, mayStore = 0 in
404+
let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in
405405
def C_NOP : RVInst16CI<0b000, 0b01, (outs), (ins), "c.nop", "">,
406406
Sched<[WriteNop]> {
407+
let rd = 0;
408+
let imm = 0;
407409
let Inst{6-2} = 0;
408410
}
409411

@@ -639,9 +641,9 @@ def C_UNIMP : RVInst16<(outs), (ins), "c.unimp", "", [], InstFormatOther>,
639641
let Predicates = [HasStdExtCOrZca, HasRVCHints], hasSideEffects = 0, mayLoad = 0,
640642
mayStore = 0 in {
641643

642-
let rd = 0 in
643644
def C_NOP_HINT : RVInst16CI<0b000, 0b01, (outs), (ins simm6nonzero:$imm),
644645
"c.nop", "$imm">, Sched<[WriteNop]> {
646+
let rd = 0;
645647
let Inst{6-2} = imm{4-0};
646648
}
647649

0 commit comments

Comments
 (0)