mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-11 00:39:36 +00:00
A few more isAsCheapAsAMove.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63852 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
758d20f653
commit
b3379fbc60
@ -773,7 +773,7 @@ def MOVr : AsI1<0b1101, (outs GPR:$dst), (ins GPR:$src), DPFrm,
|
||||
def MOVs : AsI1<0b1101, (outs GPR:$dst), (ins so_reg:$src), DPSoRegFrm,
|
||||
"mov", " $dst, $src", [(set GPR:$dst, so_reg:$src)]>, UnaryDP;
|
||||
|
||||
let isReMaterializable = 1 in
|
||||
let isReMaterializable = 1, isAsCheapAsAMove = 1 in
|
||||
def MOVi : AsI1<0b1101, (outs GPR:$dst), (ins so_imm:$src), DPFrm,
|
||||
"mov", " $dst, $src", [(set GPR:$dst, so_imm:$src)]>, UnaryDP;
|
||||
|
||||
@ -922,7 +922,7 @@ def MVNr : AsI1<0b1111, (outs GPR:$dst), (ins GPR:$src), DPFrm,
|
||||
def MVNs : AsI1<0b1111, (outs GPR:$dst), (ins so_reg:$src), DPSoRegFrm,
|
||||
"mvn", " $dst, $src",
|
||||
[(set GPR:$dst, (not so_reg:$src))]>, UnaryDP;
|
||||
let isReMaterializable = 1 in
|
||||
let isReMaterializable = 1, isAsCheapAsAMove = 1 in
|
||||
def MVNi : AsI1<0b1111, (outs GPR:$dst), (ins so_imm:$imm), DPFrm,
|
||||
"mvn", " $dst, $imm",
|
||||
[(set GPR:$dst, so_imm_not:$imm)]>,UnaryDP;
|
||||
|
@ -1229,7 +1229,7 @@ def MOV64r0 : I<0x31, MRMInitReg, (outs GR64:$dst), (ins),
|
||||
[(set GR64:$dst, 0)]>;
|
||||
|
||||
// Materialize i64 constant where top 32-bits are zero.
|
||||
let AddedComplexity = 1, isReMaterializable = 1 in
|
||||
let AddedComplexity = 1, isReMaterializable = 1, isAsCheapAsAMove = 1 in
|
||||
def MOV64ri64i32 : Ii32<0xB8, AddRegFrm, (outs GR64:$dst), (ins i64i32imm:$src),
|
||||
"mov{l}\t{$src, ${dst:subreg32}|${dst:subreg32}, $src}",
|
||||
[(set GR64:$dst, i64immZExt32:$src)]>;
|
||||
|
@ -2812,7 +2812,7 @@ def MOV32r0 : I<0x31, MRMInitReg, (outs GR32:$dst), (ins),
|
||||
|
||||
// Basic operations on GR16 / GR32 subclasses GR16_ and GR32_ which contains only
|
||||
// those registers that have GR8 sub-registers (i.e. AX - DX, EAX - EDX).
|
||||
let neverHasSideEffects = 1 in {
|
||||
let neverHasSideEffects = 1, isAsCheapAsAMove = 1 in {
|
||||
def MOV16to16_ : I<0x89, MRMDestReg, (outs GR16_:$dst), (ins GR16:$src),
|
||||
"mov{w}\t{$src, $dst|$dst, $src}", []>, OpSize;
|
||||
def MOV32to32_ : I<0x89, MRMDestReg, (outs GR32_:$dst), (ins GR32:$src),
|
||||
|
@ -1004,6 +1004,7 @@ let Predicates = [HasSSE1] in {
|
||||
}
|
||||
|
||||
// FR32 to 128-bit vector conversion.
|
||||
let isAsCheapAsAMove = 1 in
|
||||
def MOVSS2PSrr : SSI<0x10, MRMSrcReg, (outs VR128:$dst), (ins FR32:$src),
|
||||
"movss\t{$src, $dst|$dst, $src}",
|
||||
[(set VR128:$dst,
|
||||
@ -1018,6 +1019,7 @@ def MOVSS2PSrm : SSI<0x10, MRMSrcMem, (outs VR128:$dst), (ins f32mem:$src),
|
||||
// like this:
|
||||
// def : Pat<(f32 (vector_extract (v4f32 VR128:$src), (iPTR 0))),
|
||||
// (f32 FR32:$src)>;
|
||||
let isAsCheapAsAMove = 1 in
|
||||
def MOVPS2SSrr : SSI<0x10, MRMSrcReg, (outs FR32:$dst), (ins VR128:$src),
|
||||
"movss\t{$src, $dst|$dst, $src}",
|
||||
[(set FR32:$dst, (vector_extract (v4f32 VR128:$src),
|
||||
@ -2269,6 +2271,7 @@ let isReMaterializable = 1, isAsCheapAsAMove = 1, canFoldAsLoad = 1 in
|
||||
[(set VR128:$dst, (v4i32 immAllOnesV))]>;
|
||||
|
||||
// FR64 to 128-bit vector conversion.
|
||||
let isAsCheapAsAMove = 1 in
|
||||
def MOVSD2PDrr : SDI<0x10, MRMSrcReg, (outs VR128:$dst), (ins FR64:$src),
|
||||
"movsd\t{$src, $dst|$dst, $src}",
|
||||
[(set VR128:$dst,
|
||||
@ -2311,6 +2314,7 @@ def MOVPQI2QImr : PDI<0xD6, MRMDestMem, (outs), (ins i64mem:$dst, VR128:$src),
|
||||
// like this:
|
||||
// def : Pat<(f32 (vector_extract (v4f32 VR128:$src), (iPTR 0))),
|
||||
// (f32 FR32:$src)>;
|
||||
let isAsCheapAsAMove = 1 in
|
||||
def MOVPD2SDrr : SDI<0x10, MRMSrcReg, (outs FR64:$dst), (ins VR128:$src),
|
||||
"movsd\t{$src, $dst|$dst, $src}",
|
||||
[(set FR64:$dst, (vector_extract (v2f64 VR128:$src),
|
||||
|
Loading…
x
Reference in New Issue
Block a user