mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-26 07:34:06 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212178 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f5ec1bd705
commit
0780b6db5d
@ -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]>;
|
||||
|
13
test/CodeGen/X86/avx512-inc-dec.ll
Normal file
13
test/CodeGen/X86/avx512-inc-dec.ll
Normal 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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user