[llvm] 7084c3e - [RISCV] Don't print a tab after mnemonics that don't have operands.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 00:10:39 PDT 2023


Author: Craig Topper
Date: 2023-07-24T23:53:34-07:00
New Revision: 7084c3ee93e2c85071da626ed540abce4343cebf

URL: https://github.com/llvm/llvm-project/commit/7084c3ee93e2c85071da626ed540abce4343cebf
DIFF: https://github.com/llvm/llvm-project/commit/7084c3ee93e2c85071da626ed540abce4343cebf.diff

LOG: [RISCV] Don't print a tab after mnemonics that don't have operands.

Reviewed By: wangpc

Differential Revision: https://reviews.llvm.org/D156200

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVInstrFormats.td

Removed: 
    


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


        


More information about the llvm-commits mailing list