summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/WebAssembly/signext-zeroext.ll
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2018-11-19 17:10:36 +0000
committerWouter van Oortmerssen <aardappel@gmail.com>2018-11-19 17:10:36 +0000
commit49482f824a0d92f8f97121aaa6e82f409ff23d58 (patch)
treeb6619cb3dddaca091bf225cbeadfc1fa224c0904 /llvm/test/CodeGen/WebAssembly/signext-zeroext.ll
parentb25adf5edba0bfb487828600f4294702e695fdba (diff)
downloadbcm5719-llvm-49482f824a0d92f8f97121aaa6e82f409ff23d58.tar.gz
bcm5719-llvm-49482f824a0d92f8f97121aaa6e82f409ff23d58.zip
[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
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/signext-zeroext.ll')
-rw-r--r--llvm/test/CodeGen/WebAssembly/signext-zeroext.ll12
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/signext-zeroext.ll b/llvm/test/CodeGen/WebAssembly/signext-zeroext.ll
index 0c13a0f433e..e5e69dfd01d 100644
--- a/llvm/test/CodeGen/WebAssembly/signext-zeroext.ll
+++ b/llvm/test/CodeGen/WebAssembly/signext-zeroext.ll
@@ -6,8 +6,7 @@ target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-unknown"
; CHECK-LABEL: z2s_func:
-; CHECK-NEXT: .param i32{{$}}
-; CHECK-NEXT: .result i32{{$}}
+; CHECK-NEXT: .functype z2s_func (i32) -> (i32){{$}}
; CHECK-NEXT: i32.const $push[[NUM0:[0-9]+]]=, 24{{$}}
; CHECK-NEXT: i32.shl $push[[NUM2:[0-9]+]]=, $0, $pop[[NUM0]]{{$}}
; CHECK-NEXT: i32.const $push[[NUM1:[0-9]+]]=, 24{{$}}
@@ -18,8 +17,7 @@ define signext i8 @z2s_func(i8 zeroext %t) {
}
; CHECK-LABEL: s2z_func:
-; CHECK-NEXT: .param i32{{$}}
-; CHECK-NEXT: .result i32{{$}}
+; CHECK-NEXT: .functype s2z_func (i32) -> (i32){{$}}
; CHECK-NEXT: i32.const $push[[NUM0:[0-9]+]]=, 255{{$}}
; CHECK-NEXT: i32.and $push[[NUM1:[0-9]+]]=, $0, $pop[[NUM0]]{{$}}
; CHECK-NEXT: return $pop[[NUM1]]{{$}}
@@ -28,8 +26,7 @@ define zeroext i8 @s2z_func(i8 signext %t) {
}
; CHECK-LABEL: z2s_call:
-; CHECK-NEXT: .param i32{{$}}
-; CHECK-NEXT: .result i32{{$}}
+; CHECK-NEXT: .functype z2s_call (i32) -> (i32){{$}}
; CHECK-NEXT: i32.const $push[[NUM0:[0-9]+]]=, 255{{$}}
; CHECK-NEXT: i32.and $push[[NUM1:[0-9]+]]=, $0, $pop[[NUM0]]{{$}}
; CHECK-NEXT: call $push[[NUM2:[0-9]+]]=, z2s_func@FUNCTION, $pop[[NUM1]]{{$}}
@@ -42,8 +39,7 @@ define i32 @z2s_call(i32 %t) {
}
; CHECK-LABEL: s2z_call:
-; CHECK-NEXT: .param i32{{$}}
-; CHECK-NEXT: .result i32{{$}}
+; CHECK-NEXT: .functype s2z_call (i32) -> (i32){{$}}
; CHECK-NEXT: i32.const $push[[NUM0:[0-9]+]]=, 24{{$}}
; CHECK-NEXT: i32.shl $push[[NUM1:[0-9]+]]=, $0, $pop[[NUM0]]{{$}}
; CHECK-NEXT: i32.const $push[[NUM6:[0-9]+]]=, 24{{$}}
OpenPOWER on IntegriCloud