forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322938 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=x86-64 -mattr=+rdpid | FileCheck %s --check-prefix=CHECK --check-prefix=GENERIC | ||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=icelake | FileCheck %s --check-prefix=CHECK --check-prefix=ICELAKE | ||
|
||
define i32 @test_rdpid() { | ||
; GENERIC-LABEL: test_rdpid: | ||
; GENERIC: # %bb.0: | ||
; GENERIC-NEXT: rdpid %rax # sched: [100:0.33] | ||
; GENERIC-NEXT: # kill: def %eax killed %eax killed %rax | ||
; GENERIC-NEXT: retq # sched: [1:1.00] | ||
; | ||
; ICELAKE-LABEL: test_rdpid: | ||
; ICELAKE: # %bb.0: | ||
; ICELAKE-NEXT: rdpid %rax # sched: [100:0.25] | ||
; ICELAKE-NEXT: # kill: def %eax killed %eax killed %rax | ||
; ICELAKE-NEXT: retq # sched: [7:1.00] | ||
%1 = tail call i32 @llvm.x86.rdpid() | ||
ret i32 %1 | ||
} | ||
declare i32 @llvm.x86.rdpid() |