xref: /llvm-project/llvm/test/CodeGen/AArch64/funcptr_cast.ll (revision 5ddce70ef0e5a641d7fea95e31fc5e2439cb98cb)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s
3
4define i8 @test() {
5; CHECK-LABEL: test:
6; CHECK:       // %bb.0: // %entry
7; CHECK-NEXT:    adrp x8, foo
8; CHECK-NEXT:    ldrb w0, [x8, :lo12:foo]
9; CHECK-NEXT:    ret
10entry:
11  %0 = load i8, ptr @foo, align 1
12  ret i8 %0
13}
14
15declare dso_local void @foo(...)
16