diff options
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly')
| -rw-r--r-- | llvm/test/CodeGen/WebAssembly/call.ll | 21 | 
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/call.ll b/llvm/test/CodeGen/WebAssembly/call.ll index 1cf42242a6c..dfa0cf5efe0 100644 --- a/llvm/test/CodeGen/WebAssembly/call.ll +++ b/llvm/test/CodeGen/WebAssembly/call.ll @@ -150,6 +150,27 @@ define void @coldcc_tail_call_void_nullary() {    ret void  } +; CHECK-LABEL: call_constexpr: +; CHECK-NEXT: i32.const $push[[L0:[0-9]+]]=, 2{{$}} +; CHECK-NEXT: i32.const $push[[L1:[0-9]+]]=, 3{{$}} +; CHECK-NEXT: call vararg_func@FUNCTION, $pop[[L0]], $pop[[L1]]{{$}} +; CHECK-NEXT: call other_void_nullary@FUNCTION{{$}} +; CHECK-NEXT: call void_nullary@FUNCTION{{$}} +; CHECK-NEXT: return{{$}} +declare void @vararg_func(...) +declare void @other_void_nullary() +define void @call_constexpr() { +bb0: +  call void bitcast (void (...)* @vararg_func to void (i32, i32)*)(i32 2, i32 3) +  br label %bb1 +bb1: +  call void select (i1 0, void ()* @void_nullary, void ()* @other_void_nullary)() +  br label %bb2 +bb2: +  call void inttoptr (i32 ptrtoint (void ()* @void_nullary to i32) to void ()*)() +  ret void +} +  ; TODO: test the following:  ;  - More argument combinations.  ;  - Tail call.  | 

