xref: /llvm-project/llvm/test/CodeGen/WebAssembly/import-module.ll (revision 122b0220fd45ee71acda912b0b712bb8edb6ba46)
18a9cb242SWouter van Oortmerssen; RUN: llc < %s -asm-verbose=false -wasm-keep-registers | FileCheck %s
2db1916a6SDan Gohman
3a5908009SSam Cleggtarget triple = "wasm32-unknown-unknown"
4db1916a6SDan Gohman
5db1916a6SDan Gohmandefine void @test() {
6db1916a6SDan Gohman  call void @foo()
7db1916a6SDan Gohman  call void @plain()
8db1916a6SDan Gohman  ret void
9db1916a6SDan Gohman}
10db1916a6SDan Gohman
11db1916a6SDan Gohmandeclare void @foo() #0
12db1916a6SDan Gohmandeclare void @plain()
13db1916a6SDan Gohman
14*f726e445SDan Gohmanattributes #0 = { "wasm-import-module"="bar" "wasm-import-name"="qux" }
15db1916a6SDan Gohman
16db1916a6SDan Gohman; CHECK-NOT: .import_module plain
17db1916a6SDan Gohman;     CHECK: .import_module foo, bar
18*f726e445SDan Gohman;     CHECK: .import_name foo, qux
19db1916a6SDan Gohman; CHECK-NOT: .import_module plain
20