diff options
| author | Thomas Lively <tlively@google.com> | 2019-05-23 17:26:47 +0000 |
|---|---|---|
| committer | Thomas Lively <tlively@google.com> | 2019-05-23 17:26:47 +0000 |
| commit | eafe8ef6f2b44baf5a84658caca90c2f9c1849ca (patch) | |
| tree | 38bdbf81421ed26bcfc1f748dba71f28cc2c9880 /llvm/test/CodeGen/WebAssembly/multivalue.ll | |
| parent | 7b7683d7a6c4b3839629403a85dc0bd5b9a502b6 (diff) | |
| download | bcm5719-llvm-eafe8ef6f2b44baf5a84658caca90c2f9c1849ca.tar.gz bcm5719-llvm-eafe8ef6f2b44baf5a84658caca90c2f9c1849ca.zip | |
[WebAssembly] Add multivalue and tail-call target features
Summary:
These features will both be implemented soon, so I thought I would
save time by adding the boilerplate for both of them at the same time.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D62047
llvm-svn: 361516
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/multivalue.ll')
| -rw-r--r-- | llvm/test/CodeGen/WebAssembly/multivalue.ll | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/multivalue.ll b/llvm/test/CodeGen/WebAssembly/multivalue.ll new file mode 100644 index 00000000000..cbf8d4e0a0d --- /dev/null +++ b/llvm/test/CodeGen/WebAssembly/multivalue.ll @@ -0,0 +1,28 @@ +; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=+multivalue | FileCheck %s + +; Test that the multivalue attribute is accepted +; TODO(tlively): implement multivalue + +target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128" +target triple = "wasm32-unknown-unknown" + +%pair = type { i32, i32 } +%packed_pair = type <{ i32, i32 }> + +; CHECK-LABEL: sret: +; CHECK-NEXT: sret (i32, i32, i32) -> () +define %pair @sret(%pair %p) { + ret %pair %p +} + +; CHECK-LABEL: packed_sret: +; CHECK-NEXT: packed_sret (i32, i32, i32) -> () +define %packed_pair @packed_sret(%packed_pair %p) { + ret %packed_pair %p +} + +; CHECK-LABEL: .section .custom_section.target_features +; CHECK-NEXT: .int8 1 +; CHECK-NEXT: .int8 43 +; CHECK-NEXT: .int8 10 +; CHECK-NEXT: .ascii "multivalue" |

