32 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-unknown-unknown -mcpu=generic | FileCheck %s --check-prefix=X863; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=generic | FileCheck %s --check-prefix=X644 5; Verify upgrading of the old form of the rdtscp intrinsic.6 7define i64 @test_builtin_rdtscp(ptr %A) {8; X86-LABEL: test_builtin_rdtscp:9; X86: # %bb.0:10; X86-NEXT: pushl %esi11; X86-NEXT: .cfi_def_cfa_offset 812; X86-NEXT: .cfi_offset %esi, -813; X86-NEXT: movl {{[0-9]+}}(%esp), %esi14; X86-NEXT: rdtscp15; X86-NEXT: movl %ecx, (%esi)16; X86-NEXT: popl %esi17; X86-NEXT: .cfi_def_cfa_offset 418; X86-NEXT: retl19;20; X64-LABEL: test_builtin_rdtscp:21; X64: # %bb.0:22; X64-NEXT: rdtscp23; X64-NEXT: shlq $32, %rdx24; X64-NEXT: orq %rdx, %rax25; X64-NEXT: movl %ecx, (%rdi)26; X64-NEXT: retq27 %1 = tail call i64 @llvm.x86.rdtscp(ptr %A)28 ret i64 %129}30 31declare i64 @llvm.x86.rdtscp(ptr)32