aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/AArch64/funcptr_cast.ll
blob: 49b8764c7ddd176216fd71709c7f2c6562989893 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s

define i8 @test() {
; CHECK-LABEL: test:
; CHECK:       // %bb.0: // %entry
; CHECK-NEXT:    adrp x8, foo
; CHECK-NEXT:    ldrb w0, [x8, :lo12:foo]
; CHECK-NEXT:    ret
entry:
  %0 = load i8, ptr @foo, align 1
  ret i8 %0
}

declare dso_local void @foo(...)