brintos

brintos / llvm-project-archived public Read only

0
0
Text · 920 B · 473dcdd Raw
31 lines · plain
1; RUN: llc < %s -asm-verbose=false -wasm-keep-registers | FileCheck %s2 3; Test that function pointer casts casting away varargs are replaced with4; wrappers.5 6target triple = "wasm32-unknown-unknown"7 8define void @callWithArgs() {9entry:10  call void @underspecified(i32 0, i32 1)11  call void(...) @specified(i32 0, i32 1)12  ret void13}14 15declare void @underspecified(...)16declare void @specified(i32, i32)17 18; CHECK: callWithArgs:19; CHECK: i32.const	$push1=, 020; CHECK-NEXT: i32.const	$push0=, 121; CHECK-NEXT: call    	.Lunderspecified_bitcast, $pop1, $pop022; CHECK: call    	.Lspecified_bitcast, $pop{{[0-9]+$}}23 24; CHECK: .Lunderspecified_bitcast:25; CHECK-NEXT: .functype .Lunderspecified_bitcast (i32, i32) -> (){{$}}26; CHECK: call    	underspecified, $pop{{[0-9]+$}}27 28; CHECK: .Lspecified_bitcast:29; CHECK-NEXT: .functype .Lspecified_bitcast (i32) -> (){{$}}30; CHECK: call    	specified, $pop{{[0-9]+}}, $pop{{[0-9]+$}}31