xref: /aosp_15_r20/external/llvm/test/CodeGen/PowerPC/ppc64-cyclecounter.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Workertarget datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32:64"
2*9880d681SAndroid Build Coastguard Workertarget triple = "powerpc64-unknown-linux-gnu"
3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s | FileCheck %s
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdefine i64 @test1() nounwind {
6*9880d681SAndroid Build Coastguard Workerentry:
7*9880d681SAndroid Build Coastguard Worker  %r = call i64 @llvm.readcyclecounter()
8*9880d681SAndroid Build Coastguard Worker  ret i64 %r
9*9880d681SAndroid Build Coastguard Worker}
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker; CHECK: @test1
12*9880d681SAndroid Build Coastguard Worker; CHECK: mfspr 3, 268
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Workerdeclare i64 @llvm.readcyclecounter()
15*9880d681SAndroid Build Coastguard Worker
16