llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[RISCV] Incorrect definition of InsnCI

Open svs-quic opened this issue 2 years ago • 1 comments

According to the spec:

26.2. Compressed Instruction Formats CR, CI, and CSS can use any of the 32 RVI registers, but CIW, CL, CS, CA, and CB are limited to just 8 of them.

But the definition in RISCVInstrInfoC.td has it taking AnyRegC. This should be AnyReg.

def InsnCI : DirectiveInsnCI<(outs AnyRegC:$rd), (ins uimm2_opcode:$opcode,

svs-quic avatar Jul 23 '24 12:07 svs-quic

@llvm/issue-subscribers-backend-risc-v

Author: Sudharsan Veeravalli (svs-quic)

According to the spec:

> 26.2. Compressed Instruction Formats > CR, CI, and CSS can use any of the 32 RVI registers, but CIW, CL, CS, CA, and CB are limited to just 8 of them.

But the definition in RISCVInstrInfoC.td has it taking AnyRegC. This should be AnyReg.

def InsnCI : DirectiveInsnCI&lt;(outs AnyRegC:$rd), (ins uimm2_opcode:$opcode,

llvmbot avatar Jul 23 '24 12:07 llvmbot