[WebAssembly] replaced .param/.result by .functype
Summary:
This makes it easier/cleaner to generate a single signature from
this directive. Also:
- Adds the symbol name, such that we don't depend on the location
of this directive anymore.
- Actually constructs the signature in the assembler, and make the
assembler own it.
- Refactor the use of MVT vs ValType in the streamer and assembler
to require less conversions overall.
- Changed 700 or so tests to use it.
Reviewers: sbc100, dschuff
Subscribers: jgravelle-google, eraman, aheejin, sunfish, jfb, llvm-commits
Differential Revision: https://reviews.llvm.org/D54652
llvm-svn: 347228
diff --git a/llvm/test/CodeGen/WebAssembly/offset-folding.ll b/llvm/test/CodeGen/WebAssembly/offset-folding.ll
index 335275d..54a8636 100644
--- a/llvm/test/CodeGen/WebAssembly/offset-folding.ll
+++ b/llvm/test/CodeGen/WebAssembly/offset-folding.ll
@@ -11,7 +11,7 @@
; Test basic constant offsets of both defined and external symbols.
; CHECK-LABEL: test0:
-; CHECK-NEXT: .result i32{{$}}
+; CHECK-NEXT: .functype test0 () -> (i32){{$}}
; CHECK-NEXT: i32.const $push0=, x+188{{$}}
; CHECK=NEXT: return $pop0{{$}}
define i32* @test0() {
@@ -19,7 +19,7 @@
}
; CHECK-LABEL: test1:
-; CHECK-NEXT: .result i32{{$}}
+; CHECK-NEXT: .functype test1 () -> (i32){{$}}
; CHECK-NEXT: i32.const $push0=, y+188{{$}}
; CHECK=NEXT: return $pop0{{$}}
define i32* @test1() {
@@ -29,7 +29,7 @@
; Test zero offsets.
; CHECK-LABEL: test2:
-; CHECK-NEXT: .result i32{{$}}
+; CHECK-NEXT: .functype test2 () -> (i32){{$}}
; CHECK-NEXT: i32.const $push0=, x{{$}}
; CHECK=NEXT: return $pop0{{$}}
define i32* @test2() {
@@ -37,7 +37,7 @@
}
; CHECK-LABEL: test3:
-; CHECK-NEXT: .result i32{{$}}
+; CHECK-NEXT: .functype test3 () -> (i32){{$}}
; CHECK-NEXT: i32.const $push0=, y{{$}}
; CHECK=NEXT: return $pop0{{$}}
define i32* @test3() {
@@ -47,7 +47,7 @@
; Test negative offsets.
; CHECK-LABEL: test4:
-; CHECK-NEXT: .result i32{{$}}
+; CHECK-NEXT: .functype test4 () -> (i32){{$}}
; CHECK-NEXT: i32.const $push0=, x-188{{$}}
; CHECK=NEXT: return $pop0{{$}}
define i32* @test4() {
@@ -55,7 +55,7 @@
}
; CHECK-LABEL: test5:
-; CHECK-NEXT: .result i32{{$}}
+; CHECK-NEXT: .functype test5 () -> (i32){{$}}
; CHECK-NEXT: i32.const $push0=, y-188{{$}}
; CHECK=NEXT: return $pop0{{$}}
define i32* @test5() {