From a11eeb4d4a99f61c2626ce2c0d44175a9eaa2c59 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Tue, 25 Aug 2020 15:45:06 +0100 Subject: [PATCH] [RISC-V] Mark C_MV as a move instruction Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D86517 --- llvm/lib/Target/RISCV/RISCVInstrInfoC.td | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoC.td b/llvm/lib/Target/RISCV/RISCVInstrInfoC.td index f687678..a9960ea 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfoC.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoC.td @@ -519,7 +519,8 @@ def C_JR : RVInst16CR<0b1000, 0b10, (outs), (ins GPRNoX0:$rs1), let rs2 = 0; } -let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in +let hasSideEffects = 0, mayLoad = 0, mayStore = 0, isMoveReg = 1, + isAsCheapAsAMove = 1 in def C_MV : RVInst16CR<0b1000, 0b10, (outs GPRNoX0:$rs1), (ins GPRNoX0:$rs2), "c.mv", "$rs1, $rs2">, Sched<[WriteIALU, ReadIALU]>; -- 2.7.4