Skip to content

Commit f955030

Browse files
committed
[WebAssembly] Define a new "Trail1" CPU
First, define some new target features. These are subsets of existing features that reflect implemenetation concerns: - "call-indirect-overlong" - implied by "reference-types"; just the overlong encoding for the `call_indirect` immediate, and not the actual reference types. - "bulk-memory-opt" - implied by "bulk-memory": just `memory.copy` and `memory.fill`, and not the other instructions in the bulk-memory proposal. Next, define a new target CPU, "Trail1", which enables mutable-globals, bulk-memory-opt, multivalue, sign-ext, nontrapping-fptoint, extended-const, and call-indirect-overlong. Unlike the default "generic" CPU, "trail1" is meant to be frozen, and followed up by "trail2" and so on when new features are desired.
1 parent 5287a9b commit f955030

18 files changed

+104
-30
lines changed

clang/lib/Basic/Targets/WebAssembly.cpp

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ bool WebAssemblyTargetInfo::hasFeature(StringRef Feature) const {
4747
return llvm::StringSwitch<bool>(Feature)
4848
.Case("atomics", HasAtomics)
4949
.Case("bulk-memory", HasBulkMemory)
50+
.Case("bulk-memory-opt", HasBulkMemoryOpt)
5051
.Case("exception-handling", HasExceptionHandling)
5152
.Case("extended-const", HasExtendedConst)
5253
.Case("fp16", HasFP16)
@@ -55,6 +56,7 @@ bool WebAssemblyTargetInfo::hasFeature(StringRef Feature) const {
5556
.Case("mutable-globals", HasMutableGlobals)
5657
.Case("nontrapping-fptoint", HasNontrappingFPToInt)
5758
.Case("reference-types", HasReferenceTypes)
59+
.Case("call-indirect-overlong", HasCallIndirectOverlong)
5860
.Case("relaxed-simd", SIMDLevel >= RelaxedSIMD)
5961
.Case("sign-ext", HasSignExt)
6062
.Case("simd128", SIMDLevel >= SIMD128)
@@ -79,6 +81,8 @@ void WebAssemblyTargetInfo::getTargetDefines(const LangOptions &Opts,
7981
Builder.defineMacro("__wasm_atomics__");
8082
if (HasBulkMemory)
8183
Builder.defineMacro("__wasm_bulk_memory__");
84+
if (HasBulkMemoryOpt)
85+
Builder.defineMacro("__wasm_bulk_memory_opt__");
8286
if (HasExceptionHandling)
8387
Builder.defineMacro("__wasm_exception_handling__");
8488
if (HasExtendedConst)
@@ -155,12 +159,23 @@ bool WebAssemblyTargetInfo::initFeatureMap(
155159
const std::vector<std::string> &FeaturesVec) const {
156160
auto addGenericFeatures = [&]() {
157161
Features["bulk-memory"] = true;
162+
Features["bulk-memory-opt"] = true;
158163
Features["multivalue"] = true;
159164
Features["mutable-globals"] = true;
160165
Features["nontrapping-fptoint"] = true;
161166
Features["reference-types"] = true;
167+
Features["call-indirect-overlong"] = true;
162168
Features["sign-ext"] = true;
163169
};
170+
auto addTrail1Features = [&]() {
171+
Features["multivalue"] = true;
172+
Features["mutable-globals"] = true;
173+
Features["call-indirect-overlong"] = true;
174+
Features["sign-ext"] = true;
175+
Features["bulk-memory-opt"] = true;
176+
Features["nontrapping-fptoint"] = true;
177+
Features["extended-const"] = true;
178+
};
164179
auto addBleedingEdgeFeatures = [&]() {
165180
addGenericFeatures();
166181
Features["atomics"] = true;
@@ -174,6 +189,8 @@ bool WebAssemblyTargetInfo::initFeatureMap(
174189
};
175190
if (CPU == "generic") {
176191
addGenericFeatures();
192+
} else if (CPU == "trail1") {
193+
addTrail1Features();
177194
} else if (CPU == "bleeding-edge") {
178195
addBleedingEdgeFeatures();
179196
}
@@ -200,6 +217,14 @@ bool WebAssemblyTargetInfo::handleTargetFeatures(
200217
HasBulkMemory = false;
201218
continue;
202219
}
220+
if (Feature == "+bulk-memory-opt") {
221+
HasBulkMemoryOpt = true;
222+
continue;
223+
}
224+
if (Feature == "-bulk-memory-opt") {
225+
HasBulkMemoryOpt = false;
226+
continue;
227+
}
203228
if (Feature == "+exception-handling") {
204229
HasExceptionHandling = true;
205230
continue;
@@ -265,6 +290,14 @@ bool WebAssemblyTargetInfo::handleTargetFeatures(
265290
HasReferenceTypes = false;
266291
continue;
267292
}
293+
if (Feature == "+call-indirect-overlong") {
294+
HasCallIndirectOverlong = true;
295+
continue;
296+
}
297+
if (Feature == "-call-indirect-overlong") {
298+
HasCallIndirectOverlong = false;
299+
continue;
300+
}
268301
if (Feature == "+relaxed-simd") {
269302
SIMDLevel = std::max(SIMDLevel, RelaxedSIMD);
270303
continue;
@@ -310,6 +343,18 @@ bool WebAssemblyTargetInfo::handleTargetFeatures(
310343
<< Feature << "-target-feature";
311344
return false;
312345
}
346+
347+
// The reference-types feature included the change to `call_indirect`
348+
// encodings to support overlong immediates.
349+
if (HasReferenceTypes) {
350+
HasCallIndirectOverlong = true;
351+
}
352+
353+
// bulk-memory-opt is a subset of bulk-memory.
354+
if (HasBulkMemory) {
355+
HasBulkMemoryOpt = true;
356+
}
357+
313358
return true;
314359
}
315360

clang/lib/Basic/Targets/WebAssembly.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyTargetInfo : public TargetInfo {
5555

5656
bool HasAtomics = false;
5757
bool HasBulkMemory = false;
58+
bool HasBulkMemoryOpt = false;
5859
bool HasExceptionHandling = false;
5960
bool HasExtendedConst = false;
6061
bool HasFP16 = false;
@@ -63,6 +64,7 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyTargetInfo : public TargetInfo {
6364
bool HasMutableGlobals = false;
6465
bool HasNontrappingFPToInt = false;
6566
bool HasReferenceTypes = false;
67+
bool HasCallIndirectOverlong = false;
6668
bool HasSignExt = false;
6769
bool HasTailCall = false;
6870
bool HasWideArithmetic = false;

lld/test/wasm/compress-relocs.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: llc -filetype=obj %s -o %t.o
2-
; RUN: llvm-mc -mattr=+reference-types -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/call-indirect.s -o %t2.o
2+
; RUN: llvm-mc -mattr=+call-indirect-overlong -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/call-indirect.s -o %t2.o
33
; RUN: wasm-ld --export-dynamic -o %t.wasm %t2.o %t.o
44
; RUN: obj2yaml %t.wasm | FileCheck %s
55
; RUN: wasm-ld --export-dynamic -O2 -o %t-opt.wasm %t2.o %t.o

lld/test/wasm/import-table-explicit.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: llvm-mc -mattr=+reference-types -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o
1+
# RUN: llvm-mc -mattr=+call-indirect-overlong -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o
22
# RUN: wasm-ld --import-table -o %t.wasm %t.o
33
# RUN: obj2yaml %t.wasm | FileCheck %s
44

lld/test/wasm/invalid-mvp-table-use.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
22
#
33
# If any table is defined or declared besides the __indirect_function_table,
4-
# the compilation unit should be compiled with -mattr=+reference-types,
4+
# the compilation unit should be compiled with -mattr=+call-indirect-overlong,
55
# causing symbol table entries to be emitted for all tables.
66
# RUN: not wasm-ld --no-entry %t.o -o %t.wasm 2>&1 | FileCheck -check-prefix=CHECK-ERR %s
77

lld/wasm/InputFiles.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,11 @@ static void setRelocs(const std::vector<T *> &chunks,
248248
}
249249
}
250250

251-
// An object file can have two approaches to tables. With the reference-types
252-
// feature enabled, input files that define or use tables declare the tables
253-
// using symbols, and record each use with a relocation. This way when the
254-
// linker combines inputs, it can collate the tables used by the inputs,
251+
// An object file can have two approaches to tables. With the
252+
// call-indirect-overlong feature enabled (explicitly, or implied by the
253+
// reference-types feature), input files that define or use tables declare the
254+
// tables using symbols, and record each use with a relocation. This way when
255+
// the linker combines inputs, it can collate the tables used by the inputs,
255256
// assigning them distinct table numbers, and renumber all the uses as
256257
// appropriate. At the same time, the linker has special logic to build the
257258
// indirect function table if it is needed.
@@ -277,7 +278,7 @@ void ObjFile::addLegacyIndirectFunctionTableIfNeeded(
277278
return;
278279

279280
// It's possible for an input to define tables and also use the indirect
280-
// function table, but forget to compile with -mattr=+reference-types.
281+
// function table, but forget to compile with -mattr=+call-indirect-overlong.
281282
// For these newer files, we require symbols for all tables, and
282283
// relocations for all of their uses.
283284
if (tableSymbolCount != 0) {

lld/wasm/SyntheticSections.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ void TableSection::addTable(InputTable *table) {
326326
// to assign table number 0 to the indirect function table.
327327
for (const auto *culprit : out.importSec->importedSymbols) {
328328
if (isa<UndefinedTable>(culprit)) {
329-
error("object file not built with 'reference-types' feature "
329+
error("object file not built with 'call-indirect-overlong' feature "
330330
"conflicts with import of table " +
331331
culprit->getName() + " by file " +
332332
toString(culprit->getFile()));

llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class WebAssemblyAsmParser final : public MCTargetAsmParser {
292292

293293
DefaultFunctionTable = getOrCreateFunctionTableSymbol(
294294
getContext(), "__indirect_function_table", Is64);
295-
if (!STI->checkFeatures("+reference-types"))
295+
if (!STI->checkFeatures("+call-indirect-overlong"))
296296
DefaultFunctionTable->setOmitFromLinkingSection();
297297
}
298298

@@ -532,11 +532,11 @@ class WebAssemblyAsmParser final : public MCTargetAsmParser {
532532
}
533533

534534
bool parseFunctionTableOperand(std::unique_ptr<WebAssemblyOperand> *Op) {
535-
if (STI->checkFeatures("+reference-types")) {
536-
// If the reference-types feature is enabled, there is an explicit table
537-
// operand. To allow the same assembly to be compiled with or without
538-
// reference types, we allow the operand to be omitted, in which case we
539-
// default to __indirect_function_table.
535+
if (STI->checkFeatures("+call-indirect-overlong")) {
536+
// If the call-indirect-overlong feature is enabled, there is an explicit
537+
// table operand. To allow the same assembly to be compiled with or
538+
// without call-indirect overlong, we allow the operand to be omitted, in
539+
// which case we default to __indirect_function_table.
540540
auto &Tok = Lexer.getTok();
541541
if (Tok.is(AsmToken::Identifier)) {
542542
auto *Sym =

llvm/lib/Target/WebAssembly/WebAssembly.td

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ def FeatureBulkMemory :
2929
SubtargetFeature<"bulk-memory", "HasBulkMemory", "true",
3030
"Enable bulk memory operations">;
3131

32+
def FeatureBulkMemoryOpt :
33+
SubtargetFeature<"bulk-memory-opt", "HasBulkMemoryOpt", "true",
34+
"Enable bulk memory optimization operations">;
35+
3236
def FeatureExceptionHandling :
3337
SubtargetFeature<"exception-handling", "HasExceptionHandling", "true",
3438
"Enable Wasm exception handling">;
@@ -63,6 +67,10 @@ def FeatureReferenceTypes :
6367
SubtargetFeature<"reference-types", "HasReferenceTypes", "true",
6468
"Enable reference types">;
6569

70+
def FeatureCallIndirectOverlong :
71+
SubtargetFeature<"call-indirect-overlong", "HasCallIndirectOverlong", "true",
72+
"Enable overlong encoding for call_indirect immediates">;
73+
6674
def FeatureRelaxedSIMD :
6775
SubtargetFeature<"relaxed-simd", "SIMDLevel", "RelaxedSIMD",
6876
"Enable relaxed-simd instructions">;
@@ -118,6 +126,12 @@ def : ProcessorModel<"generic", NoSchedModel,
118126
FeatureMutableGlobals, FeatureNontrappingFPToInt,
119127
FeatureReferenceTypes, FeatureSignExt]>;
120128

129+
def : ProcessorModel<"trail1", NoSchedModel,
130+
[FeatureMultivalue, FeatureMutableGlobals,
131+
FeatureCallIndirectOverlong, FeatureSignExt,
132+
FeatureBulkMemoryOpt, FeatureNontrappingFPToInt,
133+
FeatureExtendedConst]>;
134+
121135
// Latest and greatest experimental version of WebAssembly. Bugs included!
122136
def : ProcessorModel<"bleeding-edge", NoSchedModel,
123137
[FeatureAtomics, FeatureBulkMemory,

llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ bool WebAssemblyFastISel::selectCall(const Instruction *I) {
899899
// The table into which this call_indirect indexes.
900900
MCSymbolWasm *Table = WebAssembly::getOrCreateFunctionTableSymbol(
901901
MF->getContext(), Subtarget);
902-
if (Subtarget->hasReferenceTypes()) {
902+
if (Subtarget->hasCallIndirectOverlong()) {
903903
MIB.addSym(Table);
904904
} else {
905905
// Otherwise for the MVP there is at most one table whose number is 0, but

llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ LowerCallResults(MachineInstr &CallResults, DebugLoc DL, MachineBasicBlock *BB,
772772
MF.getContext(), Subtarget)
773773
: WebAssembly::getOrCreateFunctionTableSymbol(
774774
MF.getContext(), Subtarget);
775-
if (Subtarget->hasReferenceTypes()) {
775+
if (Subtarget->hasCallIndirectOverlong()) {
776776
MIB.addSym(Table);
777777
} else {
778778
// For the MVP there is at most one table whose number is 0, but we can't

llvm/lib/Target/WebAssembly/WebAssemblyInstrBulkMemory.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ multiclass BULK_I<dag oops_r, dag iops_r, dag oops_s, dag iops_s,
1616
list<dag> pattern_r, string asmstr_r = "",
1717
string asmstr_s = "", bits<32> simdop = -1> {
1818
defm "" : I<oops_r, iops_r, oops_s, iops_s, pattern_r, asmstr_r, asmstr_s,
19-
!or(0xfc00, !and(0xff, simdop))>,
20-
Requires<[HasBulkMemory]>;
19+
!or(0xfc00, !and(0xff, simdop))>;
2120
}
2221

2322
// Bespoke types and nodes for bulk memory ops
@@ -52,7 +51,8 @@ defm INIT_A#B :
5251
(outs), (ins i32imm_op:$seg, i32imm_op:$idx),
5352
[],
5453
"memory.init\t$seg, $idx, $dest, $offset, $size",
55-
"memory.init\t$seg, $idx", 0x08>;
54+
"memory.init\t$seg, $idx", 0x08>,
55+
Requires<[HasBulkMemory]>;
5656

5757
let mayLoad = 1, mayStore = 1 in
5858
defm COPY_A#B :

llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ def HasBulkMemory :
3030
Predicate<"Subtarget->hasBulkMemory()">,
3131
AssemblerPredicate<(all_of FeatureBulkMemory), "bulk-memory">;
3232

33+
def HasBulkMemoryOpt :
34+
Predicate<"Subtarget->hasBulkMemoryOpt()">,
35+
AssemblerPredicate<(all_of FeatureBulkMemoryOpt), "bulk-memory-opt">;
36+
3337
def HasExceptionHandling :
3438
Predicate<"Subtarget->hasExceptionHandling()">,
3539
AssemblerPredicate<(all_of FeatureExceptionHandling), "exception-handling">;
@@ -68,6 +72,10 @@ def HasReferenceTypes :
6872
Predicate<"Subtarget->hasReferenceTypes()">,
6973
AssemblerPredicate<(all_of FeatureReferenceTypes), "reference-types">;
7074

75+
def HasCallIndirectOverlong :
76+
Predicate<"Subtarget->hasCallIndirectOverlong()">,
77+
AssemblerPredicate<(all_of FeatureCallIndirectOverlong), "call-indirect-overlong">;
78+
7179
def HasRelaxedSIMD :
7280
Predicate<"Subtarget->hasRelaxedSIMD()">,
7381
AssemblerPredicate<(all_of FeatureRelaxedSIMD), "relaxed-simd">;

llvm/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SDValue WebAssemblySelectionDAGInfo::EmitTargetCodeForMemcpy(
2323
SDValue Size, Align Alignment, bool IsVolatile, bool AlwaysInline,
2424
MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const {
2525
auto &ST = DAG.getMachineFunction().getSubtarget<WebAssemblySubtarget>();
26-
if (!ST.hasBulkMemory())
26+
if (!ST.hasBulkMemoryOpt())
2727
return SDValue();
2828

2929
SDValue MemIdx = DAG.getConstant(0, DL, MVT::i32);
@@ -51,7 +51,7 @@ SDValue WebAssemblySelectionDAGInfo::EmitTargetCodeForMemset(
5151
SDValue Size, Align Alignment, bool IsVolatile, bool AlwaysInline,
5252
MachinePointerInfo DstPtrInfo) const {
5353
auto &ST = DAG.getMachineFunction().getSubtarget<WebAssemblySubtarget>();
54-
if (!ST.hasBulkMemory())
54+
if (!ST.hasBulkMemoryOpt())
5555
return SDValue();
5656

5757
SDValue MemIdx = DAG.getConstant(0, DL, MVT::i32);

llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class WebAssemblySubtarget final : public WebAssemblyGenSubtargetInfo {
4141

4242
bool HasAtomics = false;
4343
bool HasBulkMemory = false;
44+
bool HasBulkMemoryOpt = false;
4445
bool HasExceptionHandling = false;
4546
bool HasExtendedConst = false;
4647
bool HasFP16 = false;
@@ -49,6 +50,7 @@ class WebAssemblySubtarget final : public WebAssemblyGenSubtargetInfo {
4950
bool HasMutableGlobals = false;
5051
bool HasNontrappingFPToInt = false;
5152
bool HasReferenceTypes = false;
53+
bool HasCallIndirectOverlong = false;
5254
bool HasSignExt = false;
5355
bool HasTailCall = false;
5456
bool HasWideArithmetic = false;
@@ -95,6 +97,7 @@ class WebAssemblySubtarget final : public WebAssemblyGenSubtargetInfo {
9597
bool hasAddr64() const { return TargetTriple.isArch64Bit(); }
9698
bool hasAtomics() const { return HasAtomics; }
9799
bool hasBulkMemory() const { return HasBulkMemory; }
100+
bool hasBulkMemoryOpt() const { return HasBulkMemoryOpt; }
98101
bool hasExceptionHandling() const { return HasExceptionHandling; }
99102
bool hasExtendedConst() const { return HasExtendedConst; }
100103
bool hasFP16() const { return HasFP16; }
@@ -103,6 +106,7 @@ class WebAssemblySubtarget final : public WebAssemblyGenSubtargetInfo {
103106
bool hasMutableGlobals() const { return HasMutableGlobals; }
104107
bool hasNontrappingFPToInt() const { return HasNontrappingFPToInt; }
105108
bool hasReferenceTypes() const { return HasReferenceTypes; }
109+
bool hasCallIndirectOverlong() const { return HasCallIndirectOverlong; }
106110
bool hasRelaxedSIMD() const { return SIMDLevel >= RelaxedSIMD; }
107111
bool hasSignExt() const { return HasSignExt; }
108112
bool hasSIMD128() const { return SIMDLevel >= SIMD128; }

llvm/lib/Target/WebAssembly/WebAssemblyUtilities.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ MCSymbolWasm *WebAssembly::getOrCreateFunctionTableSymbol(
117117
Sym->setUndefined();
118118
}
119119
// MVP object files can't have symtab entries for tables.
120-
if (!(Subtarget && Subtarget->hasReferenceTypes()))
120+
if (!(Subtarget && Subtarget->hasCallIndirectOverlong()))
121121
Sym->setOmitFromLinkingSection();
122122
return Sym;
123123
}
@@ -142,7 +142,7 @@ MCSymbolWasm *WebAssembly::getOrCreateFuncrefCallTableSymbol(
142142
Sym->setTableType(TableType);
143143
}
144144
// MVP object files can't have symtab entries for tables.
145-
if (!(Subtarget && Subtarget->hasReferenceTypes()))
145+
if (!(Subtarget && Subtarget->hasCallIndirectOverlong()))
146146
Sym->setOmitFromLinkingSection();
147147
return Sym;
148148
}

llvm/test/CodeGen/WebAssembly/bulk-memory.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=+bulk-memory | FileCheck %s --check-prefixes CHECK,BULK-MEM
2-
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=-bulk-memory | FileCheck %s --check-prefixes CHECK,NO-BULK-MEM
1+
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=+bulk-memory-opt | FileCheck %s --check-prefixes CHECK,BULK-MEM
2+
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=-bulk-memory-opt | FileCheck %s --check-prefixes CHECK,NO-BULK-MEM
33

4-
; Test that basic bulk memory codegen works correctly
4+
; Test that basic bulk-memory-opt codegen works correctly
55

66
target triple = "wasm32-unknown-unknown"
77

llvm/test/CodeGen/WebAssembly/bulk-memory64.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=+bulk-memory | FileCheck %s --check-prefixes CHECK,BULK-MEM
2-
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=-bulk-memory | FileCheck %s --check-prefixes CHECK,NO-BULK-MEM
1+
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=+bulk-memory-opt | FileCheck %s --check-prefixes CHECK,BULK-MEM
2+
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=-bulk-memory-opt | FileCheck %s --check-prefixes CHECK,NO-BULK-MEM
33

4-
; Test that basic bulk memory codegen works correctly
4+
; Test that basic bulk memory opt codegen works correctly
55

66
target triple = "wasm64-unknown-unknown"
77

0 commit comments

Comments
 (0)