1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mcpu=generic | FileCheck %s --check-prefix=X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=generic | FileCheck %s --check-prefix=X64
5 ; Verify upgrading of the old form of the rdtscp intrinsic.
7 define i64 @test_builtin_rdtscp(i8* %A) {
8 ; X86-LABEL: test_builtin_rdtscp:
10 ; X86-NEXT: pushl %esi
11 ; X86-NEXT: .cfi_def_cfa_offset 8
12 ; X86-NEXT: .cfi_offset %esi, -8
13 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
15 ; X86-NEXT: movl %ecx, (%esi)
17 ; X86-NEXT: .cfi_def_cfa_offset 4
20 ; X64-LABEL: test_builtin_rdtscp:
23 ; X64-NEXT: shlq $32, %rdx
24 ; X64-NEXT: orq %rdx, %rax
25 ; X64-NEXT: movl %ecx, (%rdi)
27 %1 = tail call i64 @llvm.x86.rdtscp(i8* %A)
31 declare i64 @llvm.x86.rdtscp(i8*)