[llvm] a11eeb4 - [RISC-V] Mark C_MV as a move instruction

Alex Richardson via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 02:33:07 PDT 2020


Author: Alex Richardson
Date: 2020-08-27T10:32:23+01:00
New Revision: a11eeb4d4a99f61c2626ce2c0d44175a9eaa2c59

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

LOG: [RISC-V] Mark C_MV as a move instruction

Reviewed By: luismarques

Differential Revision: https://reviews.llvm.org/D86517

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 f68767847ade..a9960ea546ad 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]>;


        


More information about the llvm-commits mailing list