mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01: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. llvm-svn: 160818
This commit is contained in:
parent
44868927b9
commit
0a41a45c36
@ -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