1 ; RUN: llc -mtriple=aarch64-unknown-unknown -asm-verbose=false < %s |\
2 ; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
3 ; RUN: llc -mtriple=aarch64-unknown-unknown -mattr=-perfmon -asm-verbose=false < %s |\
4 ; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=NOPERFMON
6 define i64 @test_readcyclecounter() nounwind {
7 ; CHECK-LABEL: test_readcyclecounter:
8 ; PERFMON-NEXT: mrs x0, PMCCNTR_EL0
9 ; NOPERFMON-NEXT: mov x0, xzr
11 %tmp0 = call i64 @llvm.readcyclecounter()
15 declare i64 @llvm.readcyclecounter()