Skip to content

Commit

Permalink
[wasm-ld] Update supported features in the generic CPU configuration
Browse files Browse the repository at this point in the history
Accompanying https://reviews.llvm.org/D125728, this updates LLVM
Codegen's "generic" CPU to enable the same new features.

Differential Revision: https://reviews.llvm.org/D125729
  • Loading branch information
sunfishcode committed Nov 2, 2022
1 parent 31b9dad commit 0807bc7
Show file tree
Hide file tree
Showing 38 changed files with 80 additions and 72 deletions.
2 changes: 1 addition & 1 deletion lld/test/wasm/function-imports-first.ll
@@ -1,5 +1,5 @@
; RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ret32.s -o %t.ret32.o
; RUN: llc -filetype=obj %s -o %t.o
; RUN: llc -mcpu=mvp -filetype=obj %s -o %t.o
; RUN: wasm-ld -o %t.wasm %t.o %t.ret32.o
; RUN: obj2yaml %t.wasm | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/wasm/gc-sections.ll
@@ -1,4 +1,4 @@
; RUN: llc -filetype=obj %s -o %t.o
; RUN: llc -mcpu=mvp -filetype=obj %s -o %t.o
; RUN: yaml2obj %S/Inputs/globals.yaml -o %t_globals.o
; RUN: wasm-ld -print-gc-sections -o %t1.wasm %t.o %t_globals.o | \
; RUN: FileCheck %s -check-prefix=PRINT-GC
Expand Down
4 changes: 2 additions & 2 deletions lld/test/wasm/init-fini.ll
@@ -1,5 +1,5 @@
; RUN: llc -filetype=obj -o %t.o %s
; RUN: llc -filetype=obj %S/Inputs/global-ctor-dtor.ll -o %t.global-ctor-dtor.o
; RUN: llc -mcpu=mvp -filetype=obj -o %t.o %s
; RUN: llc -mcpu=mvp -filetype=obj %S/Inputs/global-ctor-dtor.ll -o %t.global-ctor-dtor.o

target triple = "wasm32-unknown-unknown"

Expand Down
2 changes: 1 addition & 1 deletion lld/test/wasm/local-symbols.ll
@@ -1,5 +1,5 @@
; Test that internal symbols can still be GC'd when with --export-dynamic.
; RUN: llc -filetype=obj %s -o %t.o
; RUN: llc -mcpu=mvp -filetype=obj %s -o %t.o
; RUN: wasm-ld --export-dynamic -o %t.wasm %t.o
; RUN: obj2yaml %t.wasm | FileCheck %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/wasm/locals-duplicate.test
@@ -1,5 +1,5 @@
; RUN: llc -filetype=obj %p/Inputs/locals-duplicate1.ll -o %t1.o
; RUN: llc -filetype=obj %p/Inputs/locals-duplicate2.ll -o %t2.o
; RUN: llc -mcpu=mvp -filetype=obj %p/Inputs/locals-duplicate1.ll -o %t1.o
; RUN: llc -mcpu=mvp -filetype=obj %p/Inputs/locals-duplicate2.ll -o %t2.o
; RUN: wasm-ld --export-dynamic --no-entry -o %t.wasm %t1.o %t2.o
; RUN: obj2yaml %t.wasm | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/wasm/signature-mismatch-export.ll
@@ -1,5 +1,5 @@
; RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ret32.s -o %t.ret32.o
; RUN: llc -filetype=obj %s -o %t.main.o
; RUN: llc -mcpu=mvp -filetype=obj %s -o %t.main.o
; RUN: wasm-ld --export=ret32 -o %t.wasm %t.main.o %t.ret32.o
; RUN: obj2yaml %t.wasm | FileCheck %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/wasm/weak-alias-overide.ll
@@ -1,5 +1,5 @@
; RUN: llc -filetype=obj -o %t.o %s
; RUN: llc -filetype=obj %S/Inputs/weak-alias.ll -o %t2.o
; RUN: llc -mcpu=mvp -filetype=obj -o %t.o %s
; RUN: llc -mcpu=mvp -filetype=obj %S/Inputs/weak-alias.ll -o %t2.o
; RUN: wasm-ld --export-dynamic %t.o %t2.o -o %t.wasm
; RUN: obj2yaml %t.wasm | FileCheck %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/wasm/weak-alias.ll
@@ -1,5 +1,5 @@
; RUN: llc -filetype=obj -o %t.o %s
; RUN: llc -filetype=obj %S/Inputs/weak-alias.ll -o %t2.o
; RUN: llc -mcpu=mvp -filetype=obj -o %t.o %s
; RUN: llc -mcpu=mvp -filetype=obj %S/Inputs/weak-alias.ll -o %t2.o
; RUN: wasm-ld --export-dynamic %t.o %t2.o -o %t.wasm
; RUN: obj2yaml %t.wasm | FileCheck %s

Expand Down
8 changes: 7 additions & 1 deletion llvm/lib/Target/WebAssembly/WebAssembly.td
Expand Up @@ -97,7 +97,13 @@ def WebAssemblyInstrInfo : InstrInfo;
def : ProcessorModel<"mvp", NoSchedModel, []>;

// Generic processor: latest stable version.
def : ProcessorModel<"generic", NoSchedModel, []>;
//
// This includes features that have achieved phase 4 of the standards process,
// and that are expected to work for most users in the current time, with
// consideration given to available support in relevant engines and tools, and
// the importance of the features.
def : ProcessorModel<"generic", NoSchedModel,
[FeatureSignExt, FeatureMutableGlobals]>;

// Latest and greatest experimental version of WebAssembly. Bugs included!
def : ProcessorModel<"bleeding-edge", NoSchedModel,
Expand Down
5 changes: 2 additions & 3 deletions llvm/test/CodeGen/WebAssembly/PR41149.ll
Expand Up @@ -13,9 +13,8 @@ define void @mod() {
; CHECK-NEXT: i32.load8_u 0
; CHECK-NEXT: local.tee 0
; CHECK-NEXT: local.get 0
; CHECK-NEXT: i32.const 24
; CHECK-NEXT: i32.shl
; CHECK-NEXT: i32.const 31
; CHECK-NEXT: i32.extend8_s
; CHECK-NEXT: i32.const 7
; CHECK-NEXT: i32.shr_s
; CHECK-NEXT: local.tee 0
; CHECK-NEXT: i32.xor
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/WebAssembly/bulk-memory.ll
@@ -1,5 +1,5 @@
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=+bulk-memory | FileCheck %s --check-prefixes CHECK,BULK-MEM
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=-bulk-memory | FileCheck %s --check-prefixes CHECK,NO-BULK-MEM
; 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
; 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

; Test that basic bulk memory codegen works correctly

Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/WebAssembly/bulk-memory64.ll
@@ -1,5 +1,5 @@
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=+bulk-memory | FileCheck %s --check-prefixes CHECK,BULK-MEM
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=-bulk-memory | FileCheck %s --check-prefixes CHECK,NO-BULK-MEM
; 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
; 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

; Test that basic bulk memory codegen works correctly

Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/WebAssembly/byval.ll
@@ -1,5 +1,5 @@
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -verify-machineinstrs | FileCheck %s
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -verify-machineinstrs -fast-isel | FileCheck %s
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -verify-machineinstrs -mcpu=mvp | FileCheck %s
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -verify-machineinstrs -mcpu=mvp -fast-isel | FileCheck %s

target triple = "wasm32-unknown-unknown"

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/WebAssembly/conv-trap.ll
@@ -1,4 +1,4 @@
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=-nontrapping-fptoint | FileCheck %s
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=-nontrapping-fptoint | FileCheck %s

; Test that basic conversion operations assemble as expected using
; the trapping opcodes and explicit code to suppress the trapping.
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/WebAssembly/fast-isel-noreg.ll
@@ -1,5 +1,5 @@
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers -verify-machineinstrs | FileCheck %s
; RUN: llc < %s -asm-verbose=false -wasm-keep-registers -fast-isel -verify-machineinstrs | FileCheck %s
; RUN: llc < %s -asm-verbose=false -mcpu=mvp -disable-wasm-fallthrough-return-opt -wasm-keep-registers -verify-machineinstrs | FileCheck %s
; RUN: llc < %s -asm-verbose=false -mcpu=mvp -wasm-keep-registers -fast-isel -verify-machineinstrs | FileCheck %s

; Test that FastISel does not generate instructions with NoReg

Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/WebAssembly/global.ll
@@ -1,5 +1,5 @@
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=-atomics | FileCheck %s
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=+atomics | FileCheck %s
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=-atomics | FileCheck %s
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=+atomics | FileCheck %s

; Test that globals assemble as expected.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/WebAssembly/legalize.ll
@@ -1,4 +1,4 @@
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s
; RUN: llc < %s -asm-verbose=false -mcpu=mvp -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s

; Test various types and operators that need to be legalized.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/WebAssembly/mem-intrinsics.ll
@@ -1,4 +1,4 @@
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -tail-dup-placement=0 | FileCheck %s
; RUN: llc < %s -asm-verbose=false -mcpu=mvp -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -tail-dup-placement=0 | FileCheck %s

; Test memcpy, memmove, and memset intrinsics.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/WebAssembly/memory64-feature.ll
@@ -1,4 +1,4 @@
; RUN: llc < %s | FileCheck %s
; RUN: llc -mcpu=mvp < %s | FileCheck %s

; Test that wasm64 is properly emitted into the target features section

Expand Down
8 changes: 4 additions & 4 deletions llvm/test/CodeGen/WebAssembly/multivalue.ll
@@ -1,7 +1,7 @@
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -mattr=+multivalue,+tail-call | FileCheck %s
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -mattr=+reference-types,+multivalue,+tail-call | FileCheck --check-prefix REF %s
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=+multivalue,+tail-call | FileCheck %s --check-prefix REGS
; RUN: llc < %s --filetype=obj -mattr=+multivalue,+tail-call | obj2yaml | FileCheck %s --check-prefix OBJ
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -mcpu=mvp -mattr=+multivalue,+tail-call | FileCheck %s
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -mcpu=mvp -mattr=+reference-types,+multivalue,+tail-call | FileCheck --check-prefix REF %s
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=+multivalue,+tail-call | FileCheck %s --check-prefix REGS
; RUN: llc < %s --filetype=obj -mcpu=mvp -mattr=+multivalue,+tail-call | obj2yaml | FileCheck %s --check-prefix OBJ

; Test that the multivalue calls, returns, function types, and block
; types work as expected.
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/WebAssembly/mutable-globals.ll
@@ -1,4 +1,4 @@
; RUN: llc < %s -mattr=+mutable-globals | FileCheck %s
; RUN: llc < %s -mcpu=mvp -mattr=+mutable-globals | FileCheck %s

; Test that mutable globals is properly emitted into the target features section

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/WebAssembly/reference-types.ll
@@ -1,4 +1,4 @@
; RUN: llc < %s -mattr=+reference-types | FileCheck %s
; RUN: llc < %s -mcpu=mvp -mattr=+reference-types | FileCheck %s

target triple = "wasm32-unknown-unknown"

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/WebAssembly/signext-zeroext.ll
@@ -1,4 +1,4 @@
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s
; RUN: llc < %s -mcpu=mvp -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s

; Test zeroext and signext ABI keywords

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/WebAssembly/simd-conversions.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -verify-machineinstrs -mattr=+simd128 | FileCheck %s
; RUN: llc < %s -verify-machineinstrs -mcpu=mvp -mattr=+simd128 | FileCheck %s

; Test that vector float-to-int and int-to-float instructions lower correctly

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/WebAssembly/simd-sext-inreg.ll
@@ -1,4 +1,4 @@
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -wasm-keep-registers -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -mattr=+simd128 | FileCheck %s --check-prefixes CHECK,SIMD128
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -wasm-keep-registers -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -mcpu=mvp -mattr=+simd128 | FileCheck %s --check-prefixes CHECK,SIMD128
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -wasm-keep-registers -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals | FileCheck %s --check-prefixes CHECK,NO-SIMD128

; Test that vector sign extensions lower to shifts
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/WebAssembly/tailcall.ll
@@ -1,5 +1,5 @@
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=+tail-call | FileCheck --check-prefixes=CHECK,SLOW %s
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -fast-isel -mattr=+tail-call | FileCheck --check-prefixes=CHECK,FAST %s
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=+tail-call | FileCheck --check-prefixes=CHECK,SLOW %s
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -fast-isel -mcpu=mvp -mattr=+tail-call | FileCheck --check-prefixes=CHECK,FAST %s
; RUN: llc < %s --filetype=obj -mattr=+tail-call | obj2yaml | FileCheck --check-prefix=YAML %s

; Test that the tail calls lower correctly
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/WebAssembly/target-features-tls.ll
@@ -1,5 +1,5 @@
; RUN: llc < %s -mattr=-bulk-memory,atomics | FileCheck %s --check-prefixes NO-BULK-MEM
; RUN: llc < %s -mattr=+bulk-memory,atomics | FileCheck %s --check-prefixes BULK-MEM
; RUN: llc < %s -mcpu=mvp -mattr=-bulk-memory,atomics | FileCheck %s --check-prefixes NO-BULK-MEM
; RUN: llc < %s -mcpu=mvp -mattr=+bulk-memory,atomics | FileCheck %s --check-prefixes BULK-MEM

; Test that the target features section contains -atomics or +atomics
; for modules that have thread local storage in their source.
Expand Down
31 changes: 17 additions & 14 deletions llvm/test/CodeGen/WebAssembly/target-features.ll
@@ -1,5 +1,5 @@
; RUN: llc < %s | FileCheck %s --check-prefixes CHECK,ATTRS
; RUN: llc < %s -mattr=+simd128 | FileCheck %s --check-prefixes CHECK,SIMD128
; RUN: llc < %s -mcpu=mvp -mattr=+simd128 | FileCheck %s --check-prefixes CHECK,SIMD128
; RUN: llc < %s -mcpu=bleeding-edge | FileCheck %s --check-prefixes CHECK,BLEEDING-EDGE

; Test that codegen emits target features from the command line or
Expand Down Expand Up @@ -55,17 +55,22 @@ attributes #2 = { "target-features"="+reference-types" }

; CHECK-LABEL: .custom_section.target_features,"",@

; +atomics, +nontrapping-fptoint, +reference-types
; ATTRS-NEXT: .int8 3
; ATTRS-NEXT: .int8 43
; ATTRS-NEXT: .int8 7
; ATTRS-NEXT: .ascii "atomics"
; ATTRS-NEXT: .int8 43
; ATTRS-NEXT: .int8 19
; ATTRS-NEXT: .ascii "nontrapping-fptoint"
; ATTRS-NEXT: .int8 43
; ATTRS-NEXT: .int8 15
; ATTRS-NEXT: .ascii "reference-types"
; +atomics, +reference-types, +mutable-globals
; ATTRS-NEXT: .int8 5
; ATTRS-NEXT: .int8 43
; ATTRS-NEXT: .int8 7
; ATTRS-NEXT: .ascii "atomics"
; ATTRS-NEXT: .int8 43
; ATTRS-NEXT: .int8 15
; ATTRS-NEXT: .ascii "mutable-globals"
; ATTRS-NEXT: .int8 43
; ATTRS-NEXT: .int8 19
; ATTRS-NEXT: .ascii "nontrapping-fptoint"
; ATTRS-NEXT: .int8 43
; ATTRS-NEXT: .int8 15
; ATTRS-NEXT: .ascii "reference-types"
; ATTRS-NEXT: .int8 43
; ATTRS-NEXT: .int8 8

; +atomics, +nontrapping-fptoint, +reference-types, +simd128
; SIMD128-NEXT: .int8 4
Expand Down Expand Up @@ -109,5 +114,3 @@ attributes #2 = { "target-features"="+reference-types" }
; BLEEDING-EDGE-NEXT: .int8 43
; BLEEDING-EDGE-NEXT: .int8 9
; BLEEDING-EDGE-NEXT: .ascii "tail-call"

; CHECK-NEXT: .text
2 changes: 1 addition & 1 deletion llvm/test/MC/WebAssembly/array-fill.ll
@@ -1,4 +1,4 @@
; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
; RUN: llc -mcpu=mvp -filetype=obj %s -o - | obj2yaml | FileCheck %s
; PR33624

source_filename = "ws.c"
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/MC/WebAssembly/assembler-binary.ll
@@ -1,7 +1,7 @@
; RUN: llc -filetype=asm -asm-verbose=false %s -o %t.s
; RUN: llc -mcpu=mvp -filetype=asm -asm-verbose=false %s -o %t.s
; RUN: FileCheck -check-prefix=ASM -input-file %t.s %s
; RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=asm %t.s -o - | FileCheck -check-prefix=ASM %s
; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
; RUN: llc -mcpu=mvp -filetype=obj %s -o - | obj2yaml | FileCheck %s
; RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj %t.s -o - | obj2yaml | FileCheck %s

; This specifically tests that we can generate a binary from the assembler
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MC/WebAssembly/bss.ll
@@ -1,4 +1,4 @@
; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
; RUN: llc -mcpu=mvp -filetype=obj %s -o - | obj2yaml | FileCheck %s

target triple = "wasm32-unknown-unknown"

Expand Down
6 changes: 3 additions & 3 deletions llvm/test/MC/WebAssembly/comdat.ll
@@ -1,6 +1,6 @@
; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
; RUN: llc -filetype=asm %s -asm-verbose=false -o - | FileCheck --check-prefix=ASM %s
; RUN: llc -filetype=asm %s -o - | llvm-mc -triple=wasm32 -filetype=obj -o - | obj2yaml | FileCheck %s
; RUN: llc -mcpu=mvp -filetype=obj %s -o - | obj2yaml | FileCheck %s
; RUN: llc -mcpu=mvp -filetype=asm %s -asm-verbose=false -o - | FileCheck --check-prefix=ASM %s
; RUN: llc -mcpu=mvp -filetype=asm %s -o - | llvm-mc -triple=wasm32 -filetype=obj -o - | obj2yaml | FileCheck %s
; These RUN lines verify the ll direct-to-object path, the ll->asm path, and the
; object output via asm.

Expand Down
4 changes: 2 additions & 2 deletions llvm/test/MC/WebAssembly/debug-info.ll
@@ -1,4 +1,4 @@
; RUN: llc -generate-arange-section -filetype=obj %s -o - | llvm-readobj -S -r --symbols - | FileCheck %s
; RUN: llc -mcpu=mvp -generate-arange-section -filetype=obj %s -o - | llvm-readobj -S -r --symbols - | FileCheck %s

; CHECK: Format: WASM
; CHECK-NEXT:Arch: wasm32
Expand Down Expand Up @@ -279,7 +279,7 @@ entry:
ret void, !dbg !18
}

attributes #0 = { noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="generic" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #0 = { noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="mvp" "unsafe-fp-math"="false" "use-soft-float"="false" }

!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!13, !14, !15}
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/MC/WebAssembly/debug-info64.ll
@@ -1,4 +1,4 @@
; RUN: llc -generate-arange-section -filetype=obj %s -o - | llvm-readobj -S -r --symbols - | FileCheck %s
; RUN: llc -mcpu=mvp -generate-arange-section -filetype=obj %s -o - | llvm-readobj -S -r --symbols - | FileCheck %s

; CHECK: Format: WASM
; CHECK-NEXT: Arch: wasm64
Expand Down Expand Up @@ -285,7 +285,7 @@ entry:
ret void, !dbg !18
}

attributes #0 = { noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="generic" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #0 = { noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="mvp" "unsafe-fp-math"="false" "use-soft-float"="false" }

!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!13, !14, !15}
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MC/WebAssembly/explicit-sections.ll
@@ -1,4 +1,4 @@
; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
; RUN: llc -mcpu=mvp -filetype=obj %s -o - | obj2yaml | FileCheck %s

target triple = "wasm32-unknown-unknown"

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MC/WebAssembly/global-ctor-dtor.ll
@@ -1,4 +1,4 @@
; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
; RUN: llc -mcpu=mvp -filetype=obj %s -o - | obj2yaml | FileCheck %s

target triple = "wasm32-unknown-unknown"

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MC/WebAssembly/unnamed-data.ll
@@ -1,4 +1,4 @@
; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
; RUN: llc -mcpu=mvp -filetype=obj %s -o - | obj2yaml | FileCheck %s

target triple = "wasm32-unknown-unknown"

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MC/WebAssembly/visibility.ll
@@ -1,4 +1,4 @@
; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
; RUN: llc -mcpu=mvp -filetype=obj %s -o - | obj2yaml | FileCheck %s

target triple = "wasm32-unknown-unknown"

Expand Down

0 comments on commit 0807bc7

Please sign in to comment.