1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/CodeGen/WebAssembly/call-indirect.ll
Thomas Lively 81bb5f99ad [WebAssembly] Remove datalayout strings from llc tests
The data layout strings do not have any effect on llc tests and will become
misleadingly out of date as we continue to update the canonical data layout, so
remove them from the tests.

Differential Revision: https://reviews.llvm.org/D105842
2021-07-14 11:17:08 -07:00

28 lines
969 B
LLVM

; RUN: llc < %s -asm-verbose=false -O2 | FileCheck --check-prefix=CHECK %s
; RUN: llc < %s -asm-verbose=false -O2 --filetype=obj | obj2yaml | FileCheck --check-prefix=OBJ %s
; Test that compilation units with call_indirect but without any
; function pointer declarations still get a table.
target triple = "wasm32-unknown-unknown"
; CHECK-LABEL: call_indirect_void:
; CHECK-NEXT: .functype call_indirect_void (i32) -> ()
; CHECK-NEXT: local.get 0
; CHECK-NEXT: call_indirect () -> ()
; CHECK-NEXT: end_function
define void @call_indirect_void(void ()* %callee) {
call void %callee()
ret void
}
; OBJ: Imports:
; OBJ-NEXT: - Module: env
; OBJ-NEXT: Field: __linear_memory
; OBJ-NEXT: Kind: MEMORY
; OBJ-NEXT: Memory:
; OBJ-NEXT: Minimum: 0x0
; OBJ-NEXT: - Module: env
; OBJ-NEXT: Field: __indirect_function_table
; OBJ-NEXT: Kind: TABLE