mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 04:39:44 +00:00
Remove pattern fragments for v32i8, v16i16, v8i32, v16i8, v8i16, and v4i32 loads. All integer vector loads are promoted to v2i64 or v4i64 so these pattern fragments can never match. Fix or remove patterns that used these fragments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148672 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
37abc488a0
commit
2b21fbaf11
@ -178,13 +178,11 @@ def sdmem : Operand<v2f64> {
|
||||
// 128-bit load pattern fragments
|
||||
def loadv4f32 : PatFrag<(ops node:$ptr), (v4f32 (load node:$ptr))>;
|
||||
def loadv2f64 : PatFrag<(ops node:$ptr), (v2f64 (load node:$ptr))>;
|
||||
def loadv4i32 : PatFrag<(ops node:$ptr), (v4i32 (load node:$ptr))>;
|
||||
def loadv2i64 : PatFrag<(ops node:$ptr), (v2i64 (load node:$ptr))>;
|
||||
|
||||
// 256-bit load pattern fragments
|
||||
def loadv8f32 : PatFrag<(ops node:$ptr), (v8f32 (load node:$ptr))>;
|
||||
def loadv4f64 : PatFrag<(ops node:$ptr), (v4f64 (load node:$ptr))>;
|
||||
def loadv8i32 : PatFrag<(ops node:$ptr), (v8i32 (load node:$ptr))>;
|
||||
def loadv4i64 : PatFrag<(ops node:$ptr), (v4i64 (load node:$ptr))>;
|
||||
|
||||
// Like 'store', but always requires 128-bit vector alignment.
|
||||
@ -219,8 +217,6 @@ def alignedloadv4f32 : PatFrag<(ops node:$ptr),
|
||||
(v4f32 (alignedload node:$ptr))>;
|
||||
def alignedloadv2f64 : PatFrag<(ops node:$ptr),
|
||||
(v2f64 (alignedload node:$ptr))>;
|
||||
def alignedloadv4i32 : PatFrag<(ops node:$ptr),
|
||||
(v4i32 (alignedload node:$ptr))>;
|
||||
def alignedloadv2i64 : PatFrag<(ops node:$ptr),
|
||||
(v2i64 (alignedload node:$ptr))>;
|
||||
|
||||
@ -229,8 +225,6 @@ def alignedloadv8f32 : PatFrag<(ops node:$ptr),
|
||||
(v8f32 (alignedload256 node:$ptr))>;
|
||||
def alignedloadv4f64 : PatFrag<(ops node:$ptr),
|
||||
(v4f64 (alignedload256 node:$ptr))>;
|
||||
def alignedloadv8i32 : PatFrag<(ops node:$ptr),
|
||||
(v8i32 (alignedload256 node:$ptr))>;
|
||||
def alignedloadv4i64 : PatFrag<(ops node:$ptr),
|
||||
(v4i64 (alignedload256 node:$ptr))>;
|
||||
|
||||
@ -251,18 +245,12 @@ def memopfsf64 : PatFrag<(ops node:$ptr), (f64 (memop node:$ptr))>;
|
||||
// 128-bit memop pattern fragments
|
||||
def memopv4f32 : PatFrag<(ops node:$ptr), (v4f32 (memop node:$ptr))>;
|
||||
def memopv2f64 : PatFrag<(ops node:$ptr), (v2f64 (memop node:$ptr))>;
|
||||
def memopv4i32 : PatFrag<(ops node:$ptr), (v4i32 (memop node:$ptr))>;
|
||||
def memopv2i64 : PatFrag<(ops node:$ptr), (v2i64 (memop node:$ptr))>;
|
||||
def memopv8i16 : PatFrag<(ops node:$ptr), (v8i16 (memop node:$ptr))>;
|
||||
def memopv16i8 : PatFrag<(ops node:$ptr), (v16i8 (memop node:$ptr))>;
|
||||
|
||||
// 256-bit memop pattern fragments
|
||||
def memopv8f32 : PatFrag<(ops node:$ptr), (v8f32 (memop node:$ptr))>;
|
||||
def memopv4f64 : PatFrag<(ops node:$ptr), (v4f64 (memop node:$ptr))>;
|
||||
def memopv4i64 : PatFrag<(ops node:$ptr), (v4i64 (memop node:$ptr))>;
|
||||
def memopv8i32 : PatFrag<(ops node:$ptr), (v8i32 (memop node:$ptr))>;
|
||||
def memopv16i16 : PatFrag<(ops node:$ptr), (v16i16 (memop node:$ptr))>;
|
||||
def memopv32i8 : PatFrag<(ops node:$ptr), (v32i8 (memop node:$ptr))>;
|
||||
|
||||
// SSSE3 uses MMX registers for some instructions. They aren't aligned on a
|
||||
// 16-byte boundary.
|
||||
|
@ -889,10 +889,6 @@ let Predicates = [HasSSE2] in
|
||||
// Use vmovaps/vmovups for AVX integer load/store.
|
||||
let Predicates = [HasAVX] in {
|
||||
// 128-bit load/store
|
||||
def : Pat<(alignedloadv4i32 addr:$src),
|
||||
(VMOVAPSrm addr:$src)>;
|
||||
def : Pat<(loadv4i32 addr:$src),
|
||||
(VMOVUPSrm addr:$src)>;
|
||||
def : Pat<(alignedloadv2i64 addr:$src),
|
||||
(VMOVAPSrm addr:$src)>;
|
||||
def : Pat<(loadv2i64 addr:$src),
|
||||
@ -920,10 +916,6 @@ let Predicates = [HasAVX] in {
|
||||
(VMOVAPSYrm addr:$src)>;
|
||||
def : Pat<(loadv4i64 addr:$src),
|
||||
(VMOVUPSYrm addr:$src)>;
|
||||
def : Pat<(alignedloadv8i32 addr:$src),
|
||||
(VMOVAPSYrm addr:$src)>;
|
||||
def : Pat<(loadv8i32 addr:$src),
|
||||
(VMOVUPSYrm addr:$src)>;
|
||||
def : Pat<(alignedstore256 (v4i64 VR256:$src), addr:$dst),
|
||||
(VMOVAPSYmr addr:$dst, VR256:$src)>;
|
||||
def : Pat<(alignedstore256 (v8i32 VR256:$src), addr:$dst),
|
||||
@ -946,10 +938,6 @@ let Predicates = [HasAVX] in {
|
||||
// The instructions selected below are then converted to MOVDQA/MOVDQU
|
||||
// during the SSE domain pass.
|
||||
let Predicates = [HasSSE1] in {
|
||||
def : Pat<(alignedloadv4i32 addr:$src),
|
||||
(MOVAPSrm addr:$src)>;
|
||||
def : Pat<(loadv4i32 addr:$src),
|
||||
(MOVUPSrm addr:$src)>;
|
||||
def : Pat<(alignedloadv2i64 addr:$src),
|
||||
(MOVAPSrm addr:$src)>;
|
||||
def : Pat<(loadv2i64 addr:$src),
|
||||
@ -4799,8 +4787,6 @@ def MOVZDI2PDIrm : PDI<0x6E, MRMSrcMem, (outs VR128:$dst), (ins i32mem:$src),
|
||||
let Predicates = [HasAVX] in {
|
||||
// AVX 128-bit movd/movq instruction write zeros in the high 128-bit part.
|
||||
let AddedComplexity = 20 in {
|
||||
def : Pat<(v4i32 (X86vzmovl (loadv4i32 addr:$src))),
|
||||
(VMOVZDI2PDIrm addr:$src)>;
|
||||
def : Pat<(v4i32 (X86vzmovl (bc_v4i32 (loadv4f32 addr:$src)))),
|
||||
(VMOVZDI2PDIrm addr:$src)>;
|
||||
def : Pat<(v4i32 (X86vzmovl (bc_v4i32 (loadv2i64 addr:$src)))),
|
||||
@ -4816,8 +4802,6 @@ let Predicates = [HasAVX] in {
|
||||
}
|
||||
|
||||
let Predicates = [HasSSE2], AddedComplexity = 20 in {
|
||||
def : Pat<(v4i32 (X86vzmovl (loadv4i32 addr:$src))),
|
||||
(MOVZDI2PDIrm addr:$src)>;
|
||||
def : Pat<(v4i32 (X86vzmovl (bc_v4i32 (loadv4f32 addr:$src)))),
|
||||
(MOVZDI2PDIrm addr:$src)>;
|
||||
def : Pat<(v4i32 (X86vzmovl (bc_v4i32 (loadv2i64 addr:$src)))),
|
||||
@ -4949,13 +4933,13 @@ def MOVZPQILo2PQIrm : I<0x7E, MRMSrcMem, (outs VR128:$dst), (ins i128mem:$src),
|
||||
|
||||
let AddedComplexity = 20 in {
|
||||
let Predicates = [HasAVX] in {
|
||||
def : Pat<(v2i64 (X86vzmovl (bc_v2i64 (loadv4i32 addr:$src)))),
|
||||
def : Pat<(v2i64 (X86vzmovl (loadv2i64 addr:$src))),
|
||||
(VMOVZPQILo2PQIrm addr:$src)>;
|
||||
def : Pat<(v2f64 (X86vzmovl (v2f64 VR128:$src))),
|
||||
(VMOVZPQILo2PQIrr VR128:$src)>;
|
||||
}
|
||||
let Predicates = [HasSSE2] in {
|
||||
def : Pat<(v2i64 (X86vzmovl (bc_v2i64 (loadv4i32 addr:$src)))),
|
||||
def : Pat<(v2i64 (X86vzmovl (loadv2i64 addr:$src))),
|
||||
(MOVZPQILo2PQIrm addr:$src)>;
|
||||
def : Pat<(v2f64 (X86vzmovl (v2f64 VR128:$src))),
|
||||
(MOVZPQILo2PQIrr VR128:$src)>;
|
||||
|
Loading…
Reference in New Issue
Block a user