[llvm] r321643 - [RISCV] Add Defs Uses information for c.jal and c.addi4spn

Alex Bradbury via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 2 04:09:29 PST 2018


Author: asb
Date: Tue Jan  2 04:09:29 2018
New Revision: 321643

URL: http://llvm.org/viewvc/llvm-project?rev=321643&view=rev
Log:
[RISCV] Add Defs Uses information for c.jal and c.addi4spn

Differential Revision: https://reviews.llvm.org/D41339
Patch by Shiva Chen.

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

Modified: llvm/trunk/lib/Target/RISCV/RISCVInstrInfoC.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/RISCV/RISCVInstrInfoC.td?rev=321643&r1=321642&r2=321643&view=diff
==============================================================================
--- llvm/trunk/lib/Target/RISCV/RISCVInstrInfoC.td (original)
+++ llvm/trunk/lib/Target/RISCV/RISCVInstrInfoC.td Tue Jan  2 04:09:29 2018
@@ -177,7 +177,7 @@ class CS_ALU<bits<2> funct2, string Opco
 
 let Predicates = [HasStdExtC] in {
 
-let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in
+let hasSideEffects = 0, mayLoad = 0, mayStore = 0, Uses = [X2] in
 def C_ADDI4SPN : RVInst16CIW<0b000, 0b00, (outs GPRC:$rd),
                              (ins SP:$rs1, uimm10_lsb00nonzero:$imm),
                              "c.addi4spn", "$rd, $rs1, $imm"> {
@@ -260,7 +260,7 @@ def C_ADDI : RVInst16CI<0b000, 0b01, (ou
 }
 
 let hasSideEffects = 0, mayLoad = 0, mayStore = 0, isCall = 1,
-    DecoderNamespace = "RISCV32Only_" in
+    DecoderNamespace = "RISCV32Only_", Defs = [X1] in
 def C_JAL : RVInst16CJ<0b001, 0b01, (outs), (ins simm12_lsb0:$offset),
                        "c.jal", "$offset">,
             Requires<[IsRV32]>;




More information about the llvm-commits mailing list