[AMDGPU] Mark AGPR tuple implicit in the first instr of AGPR spills. (#115285)
[llvm-project.git] / llvm / test / CodeGen / WebAssembly / call-indirect.ll
blobe0a0d14deacba0f15f0560920de088033ba86063
1 ; RUN: llc < %s -asm-verbose=false -mattr=-reference-types,-call-indirect-overlong -O2 | FileCheck --check-prefixes=CHECK,NOREF %s
2 ; RUN: llc < %s -asm-verbose=false -mattr=+call-indirect-overlong -O2 | FileCheck --check-prefixes=CHECK,REF %s
3 ; RUN: llc < %s -asm-verbose=false -O2 --filetype=obj | obj2yaml | FileCheck --check-prefix=OBJ %s
5 ; Test that compilation units with call_indirect but without any
6 ; function pointer declarations still get a table.
8 target triple = "wasm32-unknown-unknown"
10 ; CHECK-LABEL: call_indirect_void:
11 ; CHECK-NEXT: .functype call_indirect_void (i32) -> ()
12 ; CHECK-NEXT: local.get 0
13 ; REF:        call_indirect __indirect_function_table, () -> ()
14 ; NOREF:      call_indirect () -> ()
15 ; CHECK-NEXT: end_function
16 define void @call_indirect_void(ptr %callee) {
17   call void %callee()
18   ret void
21 ; OBJ:    Imports:
22 ; OBJ-NEXT:      - Module:          env
23 ; OBJ-NEXT:        Field:           __linear_memory
24 ; OBJ-NEXT:        Kind:            MEMORY
25 ; OBJ-NEXT:        Memory:
26 ; OBJ-NEXT:          Minimum:         0x0
27 ; OBJ-NEXT:      - Module:          env
28 ; OBJ-NEXT:        Field:           __indirect_function_table
29 ; OBJ-NEXT:        Kind:            TABLE