[PATCH] D52254: [WebAssembly][NFC] Add missing tests for indirect calls

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 20 15:10:55 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL342691: [WebAssembly][NFC] Add missing tests for indirect calls (authored by tlively, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D52254

Files:
  llvm/trunk/test/CodeGen/WebAssembly/call.ll


Index: llvm/trunk/test/CodeGen/WebAssembly/call.ll
===================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/call.ll
+++ llvm/trunk/test/CodeGen/WebAssembly/call.ll
@@ -112,6 +112,39 @@
   ret i32 %t
 }
 
+; CHECK-LABEL: call_indirect_i64:
+; CHECK-NEXT: .param i32{{$}}
+; CHECK-NEXT: .result i64{{$}}
+; CHECK-NEXT: get_local $push[[L0:[0-9]+]]=, 0{{$}}
+; CHECK-NEXT: {{^}} i64.call_indirect $push[[NUM:[0-9]+]]=, $pop[[L0]]{{$}}
+; CHECK-NEXT: return $pop[[NUM]]{{$}}
+define i64 @call_indirect_i64(i64 ()* %callee) {
+  %t = call i64 %callee()
+  ret i64 %t
+}
+
+; CHECK-LABEL: call_indirect_float:
+; CHECK-NEXT: .param i32{{$}}
+; CHECK-NEXT: .result f32{{$}}
+; CHECK-NEXT: get_local $push[[L0:[0-9]+]]=, 0{{$}}
+; CHECK-NEXT: {{^}} f32.call_indirect $push[[NUM:[0-9]+]]=, $pop[[L0]]{{$}}
+; CHECK-NEXT: return $pop[[NUM]]{{$}}
+define float @call_indirect_float(float ()* %callee) {
+  %t = call float %callee()
+  ret float %t
+}
+
+; CHECK-LABEL: call_indirect_double:
+; CHECK-NEXT: .param i32{{$}}
+; CHECK-NEXT: .result f64{{$}}
+; CHECK-NEXT: get_local $push[[L0:[0-9]+]]=, 0{{$}}
+; CHECK-NEXT: {{^}} f64.call_indirect $push[[NUM:[0-9]+]]=, $pop[[L0]]{{$}}
+; CHECK-NEXT: return $pop[[NUM]]{{$}}
+define double @call_indirect_double(double ()* %callee) {
+  %t = call double %callee()
+  ret double %t
+}
+
 ; CHECK-LABEL: call_indirect_v128:
 ; CHECK-NEXT: .param i32{{$}}
 ; CHECK-NEXT: .result v128{{$}}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52254.166369.patch
Type: text/x-patch
Size: 1474 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180920/3bc96046/attachment.bin>


More information about the llvm-commits mailing list