[llvm] r342691 - [WebAssembly][NFC] Add missing tests for indirect calls
Thomas Lively via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 20 15:08:27 PDT 2018
Author: tlively
Date: Thu Sep 20 15:08:27 2018
New Revision: 342691
URL: http://llvm.org/viewvc/llvm-project?rev=342691&view=rev
Log:
[WebAssembly][NFC] Add missing tests for indirect calls
Summary: Depends on D52105.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D52254
Modified:
llvm/trunk/test/CodeGen/WebAssembly/call.ll
Modified: llvm/trunk/test/CodeGen/WebAssembly/call.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WebAssembly/call.ll?rev=342691&r1=342690&r2=342691&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/call.ll (original)
+++ llvm/trunk/test/CodeGen/WebAssembly/call.ll Thu Sep 20 15:08:27 2018
@@ -112,6 +112,39 @@ define i32 @call_indirect_i32(i32 ()* %c
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{{$}}
More information about the llvm-commits
mailing list