forked from OSchip/llvm-project
[X86] Apply SlowIncDec feature to Sandybridge/Ivybridge CPUs as well
Currently we start applying this on Haswell and newer. I don't believe anything changed in the Haswell architecture to make this the right cutoff point. The partial flag handling around this has been roughly the same since Sandybridge. Differential Revision: https://reviews.llvm.org/D37250 llvm-svn: 312099
This commit is contained in:
parent
e3bbb68b0c
commit
ef1f71669e
|
@ -528,6 +528,7 @@ def SNBFeatures : ProcessorFeatures<[], [
|
|||
FeatureSlow3OpsLEA,
|
||||
FeatureFastScalarFSQRT,
|
||||
FeatureFastSHLDRotate,
|
||||
FeatureSlowIncDec,
|
||||
FeatureMacroFusion
|
||||
]>;
|
||||
|
||||
|
@ -560,8 +561,7 @@ def HSWFeatures : ProcessorFeatures<IVBFeatures.Value, [
|
|||
FeatureERMSB,
|
||||
FeatureFMA,
|
||||
FeatureLZCNT,
|
||||
FeatureMOVBE,
|
||||
FeatureSlowIncDec
|
||||
FeatureMOVBE
|
||||
]>;
|
||||
|
||||
class HaswellProc<string Name> : ProcModel<Name, HaswellModel,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; RUN: llc < %s -mtriple=x86_64-- -mcpu=corei7-avx -disable-lsr -pre-RA-sched=source -enable-misched -verify-machineinstrs | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=x86_64-- -mcpu=corei7-avx -mattr=-slow-incdec -disable-lsr -pre-RA-sched=source -enable-misched -verify-machineinstrs | FileCheck %s
|
||||
|
||||
; Verify that TEST+JE are scheduled together.
|
||||
; CHECK: test_je
|
||||
|
|
|
@ -93,7 +93,7 @@ define void @loop(i32* %p, i32 %n) nounwind {
|
|||
; X86-NEXT: rdrandl %edx
|
||||
; X86-NEXT: movl %edx, (%ecx)
|
||||
; X86-NEXT: leal 4(%ecx), %ecx
|
||||
; X86-NEXT: decl %eax
|
||||
; X86-NEXT: addl $-1, %eax
|
||||
; X86-NEXT: jne .LBB3_2
|
||||
; X86-NEXT: .LBB3_3: # %while.end
|
||||
; X86-NEXT: retl
|
||||
|
@ -108,7 +108,7 @@ define void @loop(i32* %p, i32 %n) nounwind {
|
|||
; X64-NEXT: rdrandl %eax
|
||||
; X64-NEXT: movl %eax, (%rdi)
|
||||
; X64-NEXT: leaq 4(%rdi), %rdi
|
||||
; X64-NEXT: decl %esi
|
||||
; X64-NEXT: addl $-1, %esi
|
||||
; X64-NEXT: jne .LBB3_1
|
||||
; X64-NEXT: .LBB3_2: # %while.end
|
||||
; X64-NEXT: retq
|
||||
|
|
Loading…
Reference in New Issue