1 // Check that we call llvm.load.relative() on a vtable function call.
3 // RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -O3 -o - -emit-llvm | FileCheck %s
5 // CHECK: define{{.*}} void @_Z5A_fooP1A(ptr noundef %a) local_unnamed_addr
7 // CHECK-NEXT: %vtable = load ptr, ptr %a
8 // CHECK-NEXT: [[func_ptr:%[0-9]+]] = tail call ptr @llvm.load.relative.i32(ptr %vtable, i32 0)
9 // CHECK-NEXT: tail call void [[func_ptr]](ptr {{[^,]*}} %a)
10 // CHECK-NEXT: ret void