Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llvm/lib/Target/RISCV/RISCVInstrInfoC.td
Original file line number Diff line number Diff line change
Expand Up @@ -715,14 +715,14 @@ let Predicates = [HasStdExtCOrZca] in {
def : InstAlias<"c.lw $rd, (${rs1})", (C_LW GPRC:$rd, GPRCMem:$rs1, 0)>;
def : InstAlias<"c.sw $rs2, (${rs1})", (C_SW GPRC:$rs2, GPRCMem:$rs1, 0)>;
def : InstAlias<"c.lwsp $rd, (${rs1})", (C_LWSP GPRNoX0:$rd, SPMem:$rs1, 0)>;
def : InstAlias<"c.swsp $rs2, (${rs1})", (C_SWSP GPRNoX0:$rs2, SPMem:$rs1, 0)>;
def : InstAlias<"c.swsp $rs2, (${rs1})", (C_SWSP GPR:$rs2, SPMem:$rs1, 0)>;
}

let Predicates = [HasStdExtCOrZca, IsRV64] in {
def : InstAlias<"c.ld $rd, (${rs1})", (C_LD GPRC:$rd, GPRCMem:$rs1, 0)>;
def : InstAlias<"c.sd $rs2, (${rs1})", (C_SD GPRC:$rs2, GPRCMem:$rs1, 0)>;
def : InstAlias<"c.ldsp $rd, (${rs1})", (C_LDSP GPRNoX0:$rd, SPMem:$rs1, 0)>;
def : InstAlias<"c.sdsp $rs2, (${rs1})", (C_SDSP GPRNoX0:$rs2, SPMem:$rs1, 0)>;
def : InstAlias<"c.sdsp $rs2, (${rs1})", (C_SDSP GPR:$rs2, SPMem:$rs1, 0)>;
}

let Predicates = [HasStdExtCOrZcfOrZce, HasStdExtF, IsRV32] in {
Expand Down
2 changes: 2 additions & 0 deletions llvm/test/MC/RISCV/rv64c-aliases-valid.s
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,5 @@ c.sdsp x8, (x2)
c.ldsp x18, (x2)
# CHECK-EXPAND: c.sdsp s2, 0(sp)
c.sdsp x18, (x2)
# CHECK-EXPAND: c.sdsp zero, 0(sp)
c.sdsp x0, (x2)
2 changes: 2 additions & 0 deletions llvm/test/MC/RISCV/rvc-aliases-valid.s
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ c.swsp x8, (x2)
c.lwsp x18, (x2)
# CHECK-EXPAND: c.swsp s2, 0(sp)
c.swsp x18, (x2)
# CHECK-EXPAND: c.swsp zero, 0(sp)
c.swsp x0, (x2)
Loading