summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/WebAssembly/call.ll
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2015-10-02 20:54:23 +0000
committerDan Gohman <dan433584@gmail.com>2015-10-02 20:54:23 +0000
commit9cc692b06ef88a92dfebac3115926a84cb436134 (patch)
treee19b46153ad85557bdf8ddae89aa7f37070cc7be /llvm/test/CodeGen/WebAssembly/call.ll
parente0129e474da7feb61806cd7fc1552143368e1996 (diff)
downloadbcm5719-llvm-9cc692b06ef88a92dfebac3115926a84cb436134.tar.gz
bcm5719-llvm-9cc692b06ef88a92dfebac3115926a84cb436134.zip
[WebAssembly] Support calls marked as "tail", fastcc, and coldcc.
llvm-svn: 249184
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/call.ll')
-rw-r--r--llvm/test/CodeGen/WebAssembly/call.ll25
1 files changed, 24 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/call.ll b/llvm/test/CodeGen/WebAssembly/call.ll
index bf2ae7615ad..60195a9c3e4 100644
--- a/llvm/test/CodeGen/WebAssembly/call.ll
+++ b/llvm/test/CodeGen/WebAssembly/call.ll
@@ -98,8 +98,31 @@ define i32 @call_indirect_i32(i32 ()* %callee) {
ret i32 %t
}
+; CHECK-LABEL: (func $tail_call_void_nullary
+; CHECK-NEXT: (call $void_nullary)
+; CHECK-NEXT: (return)
+define void @tail_call_void_nullary() {
+ tail call void @void_nullary()
+ ret void
+}
+
+; CHECK-LABEL: (func $fastcc_tail_call_void_nullary
+; CHECK-NEXT: (call $void_nullary)
+; CHECK-NEXT: (return)
+define void @fastcc_tail_call_void_nullary() {
+ tail call fastcc void @void_nullary()
+ ret void
+}
+
+; CHECK-LABEL: (func $coldcc_tail_call_void_nullary
+; CHECK-NEXT: (call $void_nullary)
+; CHECK-NEXT: (return)
+define void @coldcc_tail_call_void_nullary() {
+ tail call coldcc void @void_nullary()
+ ret void
+}
+
; FIXME test the following:
-; - Functions without return.
; - More argument combinations.
; - Tail call.
; - Interesting returns (struct, multiple).
OpenPOWER on IntegriCloud