Xamarin Public Jenkins (auto-signing) 468663ddbb Imported Upstream version 6.10.0.49
Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
2020-01-16 16:38:04 +00:00

16 lines
578 B
LLVM

; RUN: llc -mtriple=aarch64-unknown-unknown -asm-verbose=false < %s |\
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
; RUN: llc -mtriple=aarch64-unknown-unknown -mattr=-perfmon -asm-verbose=false < %s |\
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=NOPERFMON
define i64 @test_readcyclecounter() nounwind {
; CHECK-LABEL: test_readcyclecounter:
; PERFMON-NEXT: mrs x0, PMCCNTR_EL0
; NOPERFMON-NEXT: mov x0, xzr
; CHECK-NEXT: ret
%tmp0 = call i64 @llvm.readcyclecounter()
ret i64 %tmp0
}
declare i64 @llvm.readcyclecounter()