llvm-for-llvmta/test/CodeGen/AArch64/read-pc.ll

12 lines
244 B
LLVM
Raw Normal View History

2022-04-25 10:02:23 +02:00
; RUN: llc < %s -mtriple=arm64-linux-gnu | FileCheck %s
define i64 @read_pc() {
; CHECK: adr x0, #0
%pc = call i64 @llvm.read_register.i64(metadata !0)
ret i64 %pc
}
declare i64 @llvm.read_register.i64(metadata) nounwind
!0 = !{!"pc"}