Skip to content

Commit 33f3d55

Browse files
author
Michael Skvortsov
committed
Improve asm formatting
1 parent 6c569b4 commit 33f3d55

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

llvm/lib/Target/TVM/TVMAsmPrinter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ void TVMAsmPrinter::EmitInstruction(const MachineInstr *MI) {
116116
case TVM::FROM_SLICE_COPY_S:
117117
case TVM::FROM_BUILDER_COPY_S:
118118
case TVM::FROM_CELL_COPY_S:
119+
case TVM::PUSH_GLOBAL_ADDRESS_S:
119120
break;
120121
case TVM::FALLTHROUGH_RETURN:
121122
if (isVerbose()) {

llvm/lib/Target/TVM/TVMCellInstrInfo.td

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,16 @@ defm LDI : I<(outs I257 : $x, Slice : $sliceo),
7979
(outs), (ins uimm1_256 : $precision),
8080
[(set I257 : $x, Slice : $sliceo,
8181
(int_tvm_ldi Slice : $slicei, uimm1_256 : $precision))],
82-
"LDI\t $precision, $slicei, $x, $sliceo",
83-
"LDI\t $precision", 0xd2>;
82+
"LDI\t$precision, $slicei, $x, $sliceo",
83+
"LDI\t$precision", 0xd2>;
8484

8585
defm LDU : I<(outs I257 : $x, Slice : $sliceo),
8686
(ins Slice : $slicei, uimm1_256 : $precision),
8787
(outs), (ins uimm1_256 : $precision),
8888
[(set I257 : $x, Slice : $sliceo,
8989
(int_tvm_ldu Slice : $slicei, uimm1_256 : $precision))],
90-
"LDU\t $precision, $slicei, $x, $sliceo",
91-
"LDU\t $precision", 0xd3>;
90+
"LDU\t$precision, $slicei, $x, $sliceo",
91+
"LDU\t$precision", 0xd3>;
9292

9393
defm LDIX : I0<(outs I257 : $x, Slice : $sliceo),
9494
(ins Slice : $slicei, I257 : $precision),
@@ -107,8 +107,8 @@ defm LDUQ : I<(outs I257:$x, Slice:$sliceo, I257:$succ),
107107
(outs), (ins uimm1_256:$precision),
108108
[(set I257:$x, Slice:$sliceo, I257:$succ,
109109
(int_tvm_lduq Slice:$slicei, uimm1_256:$precision))],
110-
"LDUQ\t $precision, $slicei, $x, $sliceo, $succ",
111-
"LDUQ\t $precision NULLROTRIFNOT", 0xd70d>;
110+
"LDUQ\t$precision, $slicei, $x, $sliceo, $succ",
111+
"LDUQ\t$precision NULLROTRIFNOT", 0xd70d>;
112112

113113
defm LDUXQ : I0<(outs I257:$x, Slice:$sliceo, I257:$succ),
114114
(ins Slice:$slicei, I257:$precision),
@@ -162,16 +162,16 @@ defm PLDI : I<(outs I257:$x),
162162
(outs), (ins uimm1_256:$precision),
163163
[(set I257:$x,
164164
(int_tvm_pldi Slice:$slicei, uimm1_256:$precision))],
165-
"PLDI\t $precision, $slicei, $x",
166-
"PLDI\t $precision", 0xd70a00>;
165+
"PLDI\t$precision, $slicei, $x",
166+
"PLDI\t$precision", 0xd70a00>;
167167

168168
defm PLDU : I<(outs I257:$x),
169169
(ins Slice:$slicei, uimm1_256:$precision),
170170
(outs), (ins uimm1_256:$precision),
171171
[(set I257:$x,
172172
(int_tvm_pldu Slice:$slicei, uimm1_256:$precision))],
173-
"PLDU\t $precision, $slicei, $x",
174-
"PLDU\t $precision", 0xd70b00>;
173+
"PLDU\t$precision, $slicei, $x",
174+
"PLDU\t$precision", 0xd70b00>;
175175

176176
defm PLDIX : I0<(outs I257:$x), (ins Slice:$slicei, I257:$precision),
177177
[(set I257:$x, (int_tvm_pldu Slice:$slicei, I257:$precision))],
@@ -194,7 +194,7 @@ defm STUXR : I0<(outs Builder : $builder),
194194
defm LDREFRTOS : I<(outs Slice:$cellslice, Slice:$sliceo), (ins Slice:$slicei),
195195
(outs), (ins),
196196
[(set Slice:$cellslice, Slice:$sliceo, (int_tvm_ldrefrtos Slice:$slicei))],
197-
"LDREFRTOS\t $cellslice, $sliceo, $slicei", "LDREFRTOS", 0xd5>;
197+
"LDREFRTOS\t$cellslice, $sliceo, $slicei", "LDREFRTOS", 0xd5>;
198198

199199
let hasSideEffects = 1 in
200200
defm LDREF : I<(outs Cell:$ocell, Slice:$oslice), (ins Slice:$islice),

llvm/lib/Target/TVM/TVMInstrFormats.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class TVMInst<bits<32> inst, string asmstr, bit stack> : Instruction {
1818
field bit StackBased = stack;
1919
let Namespace = "TVM";
2020
let Pattern = [];
21-
let AsmString = asmstr;
21+
let AsmString = !subst("\t", " ", asmstr);
2222
}
2323

2424
// Normal instructions. Default instantiation of a TVMInst.

llvm/test/CodeGen/TVM/load-store-global.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc < %s -march=tvm | FileCheck %s
1+
; RUN: llc < %s -march=tvm -asm-verbose=0 | FileCheck %s
22
target triple = "tvm"
33

44
@value1 = global i257 1

0 commit comments

Comments
 (0)