-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Labels
backend:RISC-Vgood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute
Description
I think the XTheadMemPair extension requires rs1 != rd1 && rs1 != rd2 && rd1 != rd2.
We have a check in the assembler in validateInstruction but it isn't as strict.
if (Opcode == RISCV::TH_LDD || Opcode == RISCV::TH_LWUD ||
Opcode == RISCV::TH_LWD) {
MCRegister Rd1 = Inst.getOperand(0).getReg();
MCRegister Rd2 = Inst.getOperand(1).getReg();
MCRegister Rs1 = Inst.getOperand(2).getReg();
// The encoding with rd1 == rd2 == rs1 is reserved for XTHead load pair.
if (Rs1 == Rd1 && Rs1 == Rd2) {
SMLoc Loc = Operands[1]->getStartLoc();
return Error(Loc, "rs1, rd1, and rd2 cannot all be the same");
}
}
Metadata
Metadata
Assignees
Labels
backend:RISC-Vgood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute