bolt/deps/llvm-18.1.8/llvm/test/CodeGen/AArch64/funcptr_cast.ll

16 lines
400 B
LLVM
Raw Normal View History

2025-02-14 19:21:04 +01:00
; 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(...)