[PATCH] D41339: [RISCV] Add Defs Uses information for c.jal and c.addi4spn

Shiva Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 17 17:53:18 PST 2017


shiva0217 created this revision.
shiva0217 added a reviewer: asb.
Herald added subscribers: sabuasal, jordy.potman.lists, simoncook, johnrusso, rbar.

Add Defs Uses information for c.jal and c.addi4spn


Repository:
  rL LLVM

https://reviews.llvm.org/D41339

Files:
  lib/Target/RISCV/RISCVInstrInfoC.td


Index: lib/Target/RISCV/RISCVInstrInfoC.td
===================================================================
--- lib/Target/RISCV/RISCVInstrInfoC.td
+++ lib/Target/RISCV/RISCVInstrInfoC.td
@@ -177,7 +177,7 @@
 
 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 @@
 }
 
 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]>;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41339.127296.patch
Type: text/x-patch
Size: 904 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171218/9c8ca6f9/attachment.bin>


More information about the llvm-commits mailing list