diff --git a/llvm/lib/Target/RISCV/RISCVInstrFormats.td b/llvm/lib/Target/RISCV/RISCVInstrFormats.td --- a/llvm/lib/Target/RISCV/RISCVInstrFormats.td +++ b/llvm/lib/Target/RISCV/RISCVInstrFormats.td @@ -162,7 +162,7 @@ dag OutOperandList = outs; dag InOperandList = ins; - let AsmString = opcodestr # "\t" # argstr; + let AsmString = !if(!empty(argstr), opcodestr, opcodestr # "\t" # argstr); let Pattern = pattern; let TSFlags{4-0} = format.Value;