mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-12 15:05:06 +00:00
Eliminate some SUBREG_TO_REG patterns with sub_ss and sub_sd.
The SUBREG_TO_REG instruction has magic semantics asserting that the source value was defined by an instruction that cleared the high half of the register. Those semantics are never actually exploited for xmm registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160818 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
369a4c7759
commit
0cf3c93c99
@ -717,14 +717,13 @@ let Predicates = [HasSSE1] in {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let AddedComplexity = 20 in {
|
let AddedComplexity = 20 in {
|
||||||
// MOVSSrm zeros the high parts of the register; represent this
|
// MOVSSrm already zeros the high parts of the register.
|
||||||
// with SUBREG_TO_REG.
|
|
||||||
def : Pat<(v4f32 (X86vzmovl (v4f32 (scalar_to_vector (loadf32 addr:$src))))),
|
def : Pat<(v4f32 (X86vzmovl (v4f32 (scalar_to_vector (loadf32 addr:$src))))),
|
||||||
(SUBREG_TO_REG (i32 0), (MOVSSrm addr:$src), sub_ss)>;
|
(COPY_TO_REGCLASS (MOVSSrm addr:$src), VR128)>;
|
||||||
def : Pat<(v4f32 (scalar_to_vector (loadf32 addr:$src))),
|
def : Pat<(v4f32 (scalar_to_vector (loadf32 addr:$src))),
|
||||||
(SUBREG_TO_REG (i32 0), (MOVSSrm addr:$src), sub_ss)>;
|
(COPY_TO_REGCLASS (MOVSSrm addr:$src), VR128)>;
|
||||||
def : Pat<(v4f32 (X86vzmovl (loadv4f32 addr:$src))),
|
def : Pat<(v4f32 (X86vzmovl (loadv4f32 addr:$src))),
|
||||||
(SUBREG_TO_REG (i32 0), (MOVSSrm addr:$src), sub_ss)>;
|
(COPY_TO_REGCLASS (MOVSSrm addr:$src), VR128)>;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract and store.
|
// Extract and store.
|
||||||
@ -748,18 +747,17 @@ let Predicates = [HasSSE2] in {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let AddedComplexity = 20 in {
|
let AddedComplexity = 20 in {
|
||||||
// MOVSDrm zeros the high parts of the register; represent this
|
// MOVSDrm already zeros the high parts of the register.
|
||||||
// with SUBREG_TO_REG.
|
|
||||||
def : Pat<(v2f64 (X86vzmovl (v2f64 (scalar_to_vector (loadf64 addr:$src))))),
|
def : Pat<(v2f64 (X86vzmovl (v2f64 (scalar_to_vector (loadf64 addr:$src))))),
|
||||||
(SUBREG_TO_REG (i64 0), (MOVSDrm addr:$src), sub_sd)>;
|
(COPY_TO_REGCLASS (MOVSDrm addr:$src), VR128)>;
|
||||||
def : Pat<(v2f64 (scalar_to_vector (loadf64 addr:$src))),
|
def : Pat<(v2f64 (scalar_to_vector (loadf64 addr:$src))),
|
||||||
(SUBREG_TO_REG (i64 0), (MOVSDrm addr:$src), sub_sd)>;
|
(COPY_TO_REGCLASS (MOVSDrm addr:$src), VR128)>;
|
||||||
def : Pat<(v2f64 (X86vzmovl (loadv2f64 addr:$src))),
|
def : Pat<(v2f64 (X86vzmovl (loadv2f64 addr:$src))),
|
||||||
(SUBREG_TO_REG (i64 0), (MOVSDrm addr:$src), sub_sd)>;
|
(COPY_TO_REGCLASS (MOVSDrm addr:$src), VR128)>;
|
||||||
def : Pat<(v2f64 (X86vzmovl (bc_v2f64 (loadv4f32 addr:$src)))),
|
def : Pat<(v2f64 (X86vzmovl (bc_v2f64 (loadv4f32 addr:$src)))),
|
||||||
(SUBREG_TO_REG (i64 0), (MOVSDrm addr:$src), sub_sd)>;
|
(COPY_TO_REGCLASS (MOVSDrm addr:$src), VR128)>;
|
||||||
def : Pat<(v2f64 (X86vzload addr:$src)),
|
def : Pat<(v2f64 (X86vzload addr:$src)),
|
||||||
(SUBREG_TO_REG (i64 0), (MOVSDrm addr:$src), sub_sd)>;
|
(COPY_TO_REGCLASS (MOVSDrm addr:$src), VR128)>;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract and store.
|
// Extract and store.
|
||||||
|
Loading…
Reference in New Issue
Block a user