Salvatore Dipietro 3a894fd90b [AArch64] Lower READCYCLECOUNTER using MRS CNTVCT_EL0
As suggested in D12425 it would be better for the readcyclecounter
function on ARM architecture to use the CNTVCT_EL0 register
(Counter-timer Virtual Count register) instead of the PMCCNTR_EL0
(Performance Monitors Cycle Count Register) because the PMCCNTR_EL0 is a
PMU register which, depending on the configuration, it might always
return zeroes and it doesn't guaranteed to always be increased.

Differential Revision: https://reviews.llvm.org/D136999
2022-12-09 10:36:16 +00:00

14 lines
486 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
;; -mattr=+all is not intended to be used for code emitters. Nevertheless,
;; llc does not reject it. This test intends to catch behavior changes.
; RUN: llc -mtriple=aarch64 -mattr=+all < %s | FileCheck %s
define half @bf16() nounwind {
; CHECK-LABEL: bf16:
; CHECK: // %bb.0:
; CHECK-NEXT: adrp x8, .LCPI0_0
; CHECK-NEXT: ldr h0, [x8, :lo12:.LCPI0_0]
; CHECK-NEXT: ret
ret half 0xH0000
}