Skip to content

Commit

Permalink
[X86] Add RDPID schedule test
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322938 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
RKSimon committed Jan 19, 2018
1 parent ce6a5c9 commit 674fbfa
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/CodeGen/X86/rdpid-schedule.ll
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()

0 comments on commit 674fbfa

Please sign in to comment.