mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
X86: Added FeatureVectorUAMem for all AVX architectures.
According to AVX specification: "Most arithmetic and data processing instructions encoded using the VEX prefix and performing memory accesses have more flexible memory alignment requirements than instructions that are encoded without the VEX prefix. Specifically, With the exception of explicitly aligned 16 or 32 byte SIMD load/store instructions, most VEX-encoded, arithmetic and data processing instructions operate in a flexible environment regarding memory address alignment, i.e. VEX-encoded instruction with 32-byte or 16-byte load semantics will support unaligned load operation by default. Memory arguments for most instructions with VEX prefix operate normally without causing #GP(0) on any byte-granularity alignment (unlike Legacy SSE instructions)." The same for AVX-512. This change does not affect anything right now, because only the "memop pattern fragment" depends on FeatureVectorUAMem and it is not used in AVX patterns. All AVX patterns are based on the "unaligned load" anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224330 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9e2c0f95fe
commit
4519623e9f
@ -309,6 +309,7 @@ class SandyBridgeProc<string Name> : ProcessorModel<Name, SandyBridgeModel, [
|
||||
FeatureCMPXCHG16B,
|
||||
FeatureFastUAMem,
|
||||
FeatureSlowUAMem32,
|
||||
FeatureVectorUAMem,
|
||||
FeaturePOPCNT,
|
||||
FeatureAES,
|
||||
FeaturePCLMUL
|
||||
@ -321,6 +322,7 @@ class IvyBridgeProc<string Name> : ProcessorModel<Name, SandyBridgeModel, [
|
||||
FeatureCMPXCHG16B,
|
||||
FeatureFastUAMem,
|
||||
FeatureSlowUAMem32,
|
||||
FeatureVectorUAMem,
|
||||
FeaturePOPCNT,
|
||||
FeatureAES,
|
||||
FeaturePCLMUL,
|
||||
@ -335,6 +337,7 @@ class HaswellProc<string Name> : ProcessorModel<Name, HaswellModel, [
|
||||
FeatureAVX2,
|
||||
FeatureCMPXCHG16B,
|
||||
FeatureFastUAMem,
|
||||
FeatureVectorUAMem,
|
||||
FeaturePOPCNT,
|
||||
FeatureAES,
|
||||
FeaturePCLMUL,
|
||||
@ -357,6 +360,7 @@ class BroadwellProc<string Name> : ProcessorModel<Name, HaswellModel, [
|
||||
FeatureAVX2,
|
||||
FeatureCMPXCHG16B,
|
||||
FeatureFastUAMem,
|
||||
FeatureVectorUAMem,
|
||||
FeaturePOPCNT,
|
||||
FeatureAES,
|
||||
FeaturePCLMUL,
|
||||
@ -384,7 +388,7 @@ class KnightsLandingProc<string Name> : ProcessorModel<Name, HaswellModel,
|
||||
FeatureAES, FeaturePCLMUL, FeatureRDRAND, FeatureF16C,
|
||||
FeatureFSGSBase, FeatureMOVBE, FeatureLZCNT, FeatureBMI,
|
||||
FeatureBMI2, FeatureFMA, FeatureRTM, FeatureHLE,
|
||||
FeatureSlowIncDec]>;
|
||||
FeatureSlowIncDec, FeatureVectorUAMem]>;
|
||||
def : KnightsLandingProc<"knl">;
|
||||
|
||||
// FIXME: define SKX model
|
||||
@ -395,7 +399,7 @@ class SkylakeProc<string Name> : ProcessorModel<Name, HaswellModel,
|
||||
FeatureAES, FeaturePCLMUL, FeatureRDRAND, FeatureF16C,
|
||||
FeatureFSGSBase, FeatureMOVBE, FeatureLZCNT, FeatureBMI,
|
||||
FeatureBMI2, FeatureFMA, FeatureRTM, FeatureHLE,
|
||||
FeatureSlowIncDec, FeatureSGX]>;
|
||||
FeatureSlowIncDec, FeatureSGX, FeatureVectorUAMem]>;
|
||||
def : SkylakeProc<"skylake">;
|
||||
def : SkylakeProc<"skx">; // Legacy alias.
|
||||
|
||||
|
@ -428,16 +428,6 @@ def memop : PatFrag<(ops node:$ptr), (load node:$ptr), [{
|
||||
|| cast<LoadSDNode>(N)->getAlignment() >= 16;
|
||||
}]>;
|
||||
|
||||
def memop4 : PatFrag<(ops node:$ptr), (load node:$ptr), [{
|
||||
return Subtarget->hasVectorUAMem()
|
||||
|| cast<LoadSDNode>(N)->getAlignment() >= 4;
|
||||
}]>;
|
||||
|
||||
def memop8 : PatFrag<(ops node:$ptr), (load node:$ptr), [{
|
||||
return Subtarget->hasVectorUAMem()
|
||||
|| cast<LoadSDNode>(N)->getAlignment() >= 8;
|
||||
}]>;
|
||||
|
||||
def memopfsf32 : PatFrag<(ops node:$ptr), (f32 (memop node:$ptr))>;
|
||||
def memopfsf64 : PatFrag<(ops node:$ptr), (f64 (memop node:$ptr))>;
|
||||
|
||||
@ -454,10 +444,10 @@ def memopv4f64 : PatFrag<(ops node:$ptr), (v4f64 (memop node:$ptr))>;
|
||||
def memopv4i64 : PatFrag<(ops node:$ptr), (v4i64 (memop node:$ptr))>;
|
||||
|
||||
// 512-bit memop pattern fragments
|
||||
def memopv16f32 : PatFrag<(ops node:$ptr), (v16f32 (memop4 node:$ptr))>;
|
||||
def memopv8f64 : PatFrag<(ops node:$ptr), (v8f64 (memop8 node:$ptr))>;
|
||||
def memopv16i32 : PatFrag<(ops node:$ptr), (v16i32 (memop4 node:$ptr))>;
|
||||
def memopv8i64 : PatFrag<(ops node:$ptr), (v8i64 (memop8 node:$ptr))>;
|
||||
def memopv16f32 : PatFrag<(ops node:$ptr), (v16f32 (memop node:$ptr))>;
|
||||
def memopv8f64 : PatFrag<(ops node:$ptr), (v8f64 (memop node:$ptr))>;
|
||||
def memopv16i32 : PatFrag<(ops node:$ptr), (v16i32 (memop node:$ptr))>;
|
||||
def memopv8i64 : PatFrag<(ops node:$ptr), (v8i64 (memop node:$ptr))>;
|
||||
|
||||
// SSSE3 uses MMX registers for some instructions. They aren't aligned on a
|
||||
// 16-byte boundary.
|
||||
|
Loading…
Reference in New Issue
Block a user