1 ; Test parsing indirect calls in Subzero.
3 ; RUN: %p2i -i %s --insts | FileCheck %s
4 ; RUN: %p2i -i %s --args -notranslate -timing | FileCheck --check-prefix=NOIR %s
6 define internal void @CallIndirectVoid(i32 %f_addr) {
8 %f = inttoptr i32 %f_addr to void ()*
13 ; CHECK: define internal void @CallIndirectVoid(i32 %f_addr) {
15 ; CHECK-NEXT: call void %f_addr()
16 ; CHECK-NEXT: ret void
19 define internal i32 @CallIndirectI32(i32 %f_addr) {
21 %f = inttoptr i32 %f_addr to i32(i64, i32)*
22 %r = call i32 %f(i64 1, i32 %f_addr)
26 ; CHECK-NEXT: define internal i32 @CallIndirectI32(i32 %f_addr) {
28 ; CHECK-NEXT: %r = call i32 %f_addr(i64 1, i32 %f_addr)
29 ; CHECK-NEXT: ret i32 %r
32 ; NOIR: Total across all functions