mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
[X86] Give scalar VRNDSCALE instructions priority in AVX512 mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227039 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e3792c042d
commit
ff763041d2
@ -4619,26 +4619,28 @@ defm VRNDSCALESS : avx512_rndscale_scalar<0x0A, "vrndscaless", ssmem, FR32X,
|
||||
defm VRNDSCALESD : avx512_rndscale_scalar<0x0B, "vrndscalesd", sdmem, FR64X,
|
||||
SSEPackedDouble>, EVEX_CD8<64, CD8VT1>;
|
||||
|
||||
def : Pat<(ffloor FR32X:$src),
|
||||
(VRNDSCALESSr (f32 (IMPLICIT_DEF)), FR32X:$src, (i32 0x1))>;
|
||||
def : Pat<(f64 (ffloor FR64X:$src)),
|
||||
(VRNDSCALESDr (f64 (IMPLICIT_DEF)), FR64X:$src, (i32 0x1))>;
|
||||
def : Pat<(f32 (fnearbyint FR32X:$src)),
|
||||
(VRNDSCALESSr (f32 (IMPLICIT_DEF)), FR32X:$src, (i32 0xC))>;
|
||||
def : Pat<(f64 (fnearbyint FR64X:$src)),
|
||||
(VRNDSCALESDr (f64 (IMPLICIT_DEF)), FR64X:$src, (i32 0xC))>;
|
||||
def : Pat<(f32 (fceil FR32X:$src)),
|
||||
(VRNDSCALESSr (f32 (IMPLICIT_DEF)), FR32X:$src, (i32 0x2))>;
|
||||
def : Pat<(f64 (fceil FR64X:$src)),
|
||||
(VRNDSCALESDr (f64 (IMPLICIT_DEF)), FR64X:$src, (i32 0x2))>;
|
||||
def : Pat<(f32 (frint FR32X:$src)),
|
||||
(VRNDSCALESSr (f32 (IMPLICIT_DEF)), FR32X:$src, (i32 0x4))>;
|
||||
def : Pat<(f64 (frint FR64X:$src)),
|
||||
(VRNDSCALESDr (f64 (IMPLICIT_DEF)), FR64X:$src, (i32 0x4))>;
|
||||
def : Pat<(f32 (ftrunc FR32X:$src)),
|
||||
(VRNDSCALESSr (f32 (IMPLICIT_DEF)), FR32X:$src, (i32 0x3))>;
|
||||
def : Pat<(f64 (ftrunc FR64X:$src)),
|
||||
(VRNDSCALESDr (f64 (IMPLICIT_DEF)), FR64X:$src, (i32 0x3))>;
|
||||
let Predicates = [HasAVX512] in {
|
||||
def : Pat<(ffloor FR32X:$src),
|
||||
(VRNDSCALESSr (f32 (IMPLICIT_DEF)), FR32X:$src, (i32 0x1))>;
|
||||
def : Pat<(f64 (ffloor FR64X:$src)),
|
||||
(VRNDSCALESDr (f64 (IMPLICIT_DEF)), FR64X:$src, (i32 0x1))>;
|
||||
def : Pat<(f32 (fnearbyint FR32X:$src)),
|
||||
(VRNDSCALESSr (f32 (IMPLICIT_DEF)), FR32X:$src, (i32 0xC))>;
|
||||
def : Pat<(f64 (fnearbyint FR64X:$src)),
|
||||
(VRNDSCALESDr (f64 (IMPLICIT_DEF)), FR64X:$src, (i32 0xC))>;
|
||||
def : Pat<(f32 (fceil FR32X:$src)),
|
||||
(VRNDSCALESSr (f32 (IMPLICIT_DEF)), FR32X:$src, (i32 0x2))>;
|
||||
def : Pat<(f64 (fceil FR64X:$src)),
|
||||
(VRNDSCALESDr (f64 (IMPLICIT_DEF)), FR64X:$src, (i32 0x2))>;
|
||||
def : Pat<(f32 (frint FR32X:$src)),
|
||||
(VRNDSCALESSr (f32 (IMPLICIT_DEF)), FR32X:$src, (i32 0x4))>;
|
||||
def : Pat<(f64 (frint FR64X:$src)),
|
||||
(VRNDSCALESDr (f64 (IMPLICIT_DEF)), FR64X:$src, (i32 0x4))>;
|
||||
def : Pat<(f32 (ftrunc FR32X:$src)),
|
||||
(VRNDSCALESSr (f32 (IMPLICIT_DEF)), FR32X:$src, (i32 0x3))>;
|
||||
def : Pat<(f64 (ftrunc FR64X:$src)),
|
||||
(VRNDSCALESDr (f64 (IMPLICIT_DEF)), FR64X:$src, (i32 0x3))>;
|
||||
}
|
||||
|
||||
def : Pat<(v16f32 (ffloor VR512:$src)),
|
||||
(VRNDSCALEPSZr VR512:$src, (i32 0x1))>;
|
||||
|
@ -6734,7 +6734,9 @@ let Predicates = [HasAVX] in {
|
||||
defm VROUND : sse41_fp_binop_rm<0x0A, 0x0B, "vround",
|
||||
int_x86_sse41_round_ss,
|
||||
int_x86_sse41_round_sd, 0>, VEX_4V, VEX_LIG;
|
||||
}
|
||||
|
||||
let Predicates = [UseAVX] in {
|
||||
def : Pat<(ffloor FR32:$src),
|
||||
(VROUNDSSr (f32 (IMPLICIT_DEF)), FR32:$src, (i32 0x1))>;
|
||||
def : Pat<(f64 (ffloor FR64:$src)),
|
||||
@ -6755,7 +6757,9 @@ let Predicates = [HasAVX] in {
|
||||
(VROUNDSSr (f32 (IMPLICIT_DEF)), FR32:$src, (i32 0x3))>;
|
||||
def : Pat<(f64 (ftrunc FR64:$src)),
|
||||
(VROUNDSDr (f64 (IMPLICIT_DEF)), FR64:$src, (i32 0x3))>;
|
||||
}
|
||||
|
||||
let Predicates = [HasAVX] in {
|
||||
def : Pat<(v4f32 (ffloor VR128:$src)),
|
||||
(VROUNDPSr VR128:$src, (i32 0x1))>;
|
||||
def : Pat<(v4f32 (fnearbyint VR128:$src)),
|
||||
|
Loading…
Reference in New Issue
Block a user