2547bae92eaab65e2c9450ec182c2517b298f99b
[oota-llvm.git] / test / CodeGen / WebAssembly / import.ll
1 ; RUN: llc < %s -asm-verbose=false | FileCheck %s
2
3 target datalayout = "e-p:32:32-i64:64-n32:64-S128"
4 target triple = "wasm32-unknown-unknown"
5
6 ; CHECK-LABEL: .text
7 ; CHECK-LABEL: f:
8 define void @f(i32 %a, float %b, i128 %c, i1 %d) {
9   tail call i32 @printi(i32 %a)
10   tail call float @printf(float %b)
11   tail call void @printv()
12   tail call void @split_arg(i128 %c)
13   tail call void @expanded_arg(i1 %d)
14   tail call i1 @lowered_result()
15   ret void
16 }
17
18 ; CHECK-LABEL: .imports
19 ; CHECK-NEXT:  .import printi "" printi (param i32) (result i32){{$}}
20 ; CHECK-NEXT:  .import printf "" printf (param f32) (result f32){{$}}
21 ; CHECK-NEXT:  .import printv "" printv{{$}}
22 ; CHECK-NEXT:  .import add2 "" add2 (param i32 i32) (result i32){{$}}
23 ; CHECK-NEXT:  .import split_arg "" split_arg (param i64 i64){{$}}
24 ; CHECK-NEXT:  .import expanded_arg "" expanded_arg (param i32){{$}}
25 ; CHECK-NEXT:  .import lowered_result "" lowered_result (result i32){{$}}
26 declare i32 @printi(i32)
27 declare float @printf(float)
28 declare void @printv()
29 declare i32 @add2(i32, i32)
30 declare void @split_arg(i128)
31 declare void @expanded_arg(i1)
32 declare i1 @lowered_result()