1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00

AVX-512: dec/inc instructions are slow on KNL

After Alexey Volkov, I'm adding the same property for KNL, that prefers ADD/SUB instead of INC/DEC.
Added a test.

llvm-svn: 212178
This commit is contained in:
Elena Demikhovsky 2014-07-02 14:11:05 +00:00
parent 73757b2b4b
commit 2a53c3fac5
2 changed files with 15 additions and 1 deletions

View File

@ -273,7 +273,8 @@ def : ProcessorModel<"knl", HaswellModel,
FeatureCMPXCHG16B, FeatureFastUAMem, FeaturePOPCNT,
FeatureAES, FeaturePCLMUL, FeatureRDRAND, FeatureF16C,
FeatureFSGSBase, FeatureMOVBE, FeatureLZCNT, FeatureBMI,
FeatureBMI2, FeatureFMA, FeatureRTM, FeatureHLE]>;
FeatureBMI2, FeatureFMA, FeatureRTM, FeatureHLE,
FeatureSlowIncDec]>;
def : Proc<"k6", [FeatureMMX]>;
def : Proc<"k6-2", [Feature3DNow]>;

View File

@ -0,0 +1,13 @@
; RUN: llc < %s -march=x86-64 -mtriple=x86_64-apple-darwin -mcpu=knl | FileCheck %s
;CHECK-LABEL: test
;CHECK-NOT: dec
;CHECK_NOT: enc
;CHECK: ret
define i32 @test(i32 %a, i32 %b) {
%a1 = add i32 %a, -1
%b1 = add i32 %b, 1
%res = mul i32 %a1, %b1
ret i32 %res
}