1 ; RUN: llc < %s -march=x86-64 -mcpu=generic | FileCheck %s
2 ; RUN: llc < %s -march=x86 -mcpu=generic | FileCheck %s --check-prefix=CHECK --check-prefix=X86
4 ; Verify that we correctly lower ISD::READCYCLECOUNTER.
7 define i64 @test_builtin_readcyclecounter() {
8 %1 = tail call i64 @llvm.readcyclecounter()
11 ; CHECK-LABEL: test_builtin_readcyclecounter
19 ; Verify that we correctly lower the Read Cycle Counter GCC x86 builtins
20 ; (i.e. RDTSC and RDTSCP).
22 define i64 @test_builtin_rdtsc() {
23 %1 = tail call i64 @llvm.x86.rdtsc()
26 ; CHECK-LABEL: test_builtin_rdtsc
34 define i64 @test_builtin_rdtscp(i8* %A) {
35 %1 = tail call i64 @llvm.x86.rdtscp(i8* %A)
38 ; CHECK-LABEL: test_builtin_rdtscp
41 ; CHECK: movl %ecx, (%{{[a-z0-9]+}})
46 declare i64 @llvm.readcyclecounter()
47 declare i64 @llvm.x86.rdtscp(i8*)
48 declare i64 @llvm.x86.rdtsc()