Mark re-materializable instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35230 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2007-03-21 00:16:56 +00:00
parent a125cbe839
commit 768143547b
3 changed files with 6 additions and 0 deletions

View File

@ -413,10 +413,12 @@ def FSTPrr : FPI<0xD8, AddRegFrm, (ops RST:$op), "fstp $op">, DD;
def FXCH : FPI<0xC8, AddRegFrm, (ops RST:$op), "fxch $op">, D9; def FXCH : FPI<0xC8, AddRegFrm, (ops RST:$op), "fxch $op">, D9;
// Floating point constant loads. // Floating point constant loads.
let isReMaterializable = 1 in {
def FpLD0 : FpI<(ops RFP:$dst), ZeroArgFP, def FpLD0 : FpI<(ops RFP:$dst), ZeroArgFP,
[(set RFP:$dst, fp64imm0)]>; [(set RFP:$dst, fp64imm0)]>;
def FpLD1 : FpI<(ops RFP:$dst), ZeroArgFP, def FpLD1 : FpI<(ops RFP:$dst), ZeroArgFP,
[(set RFP:$dst, fp64imm1)]>; [(set RFP:$dst, fp64imm1)]>;
}
def FLD0 : FPI<0xEE, RawFrm, (ops), "fldz">, D9; def FLD0 : FPI<0xEE, RawFrm, (ops), "fldz">, D9;
def FLD1 : FPI<0xE8, RawFrm, (ops), "fld1">, D9; def FLD1 : FPI<0xE8, RawFrm, (ops), "fld1">, D9;

View File

@ -601,6 +601,7 @@ def MOV16rr : I<0x89, MRMDestReg, (ops GR16:$dst, GR16:$src),
"mov{w} {$src, $dst|$dst, $src}", []>, OpSize; "mov{w} {$src, $dst|$dst, $src}", []>, OpSize;
def MOV32rr : I<0x89, MRMDestReg, (ops GR32:$dst, GR32:$src), def MOV32rr : I<0x89, MRMDestReg, (ops GR32:$dst, GR32:$src),
"mov{l} {$src, $dst|$dst, $src}", []>; "mov{l} {$src, $dst|$dst, $src}", []>;
let isReMaterializable = 1 in {
def MOV8ri : Ii8 <0xB0, AddRegFrm, (ops GR8 :$dst, i8imm :$src), def MOV8ri : Ii8 <0xB0, AddRegFrm, (ops GR8 :$dst, i8imm :$src),
"mov{b} {$src, $dst|$dst, $src}", "mov{b} {$src, $dst|$dst, $src}",
[(set GR8:$dst, imm:$src)]>; [(set GR8:$dst, imm:$src)]>;
@ -610,6 +611,7 @@ def MOV16ri : Ii16<0xB8, AddRegFrm, (ops GR16:$dst, i16imm:$src),
def MOV32ri : Ii32<0xB8, AddRegFrm, (ops GR32:$dst, i32imm:$src), def MOV32ri : Ii32<0xB8, AddRegFrm, (ops GR32:$dst, i32imm:$src),
"mov{l} {$src, $dst|$dst, $src}", "mov{l} {$src, $dst|$dst, $src}",
[(set GR32:$dst, imm:$src)]>; [(set GR32:$dst, imm:$src)]>;
}
def MOV8mi : Ii8 <0xC6, MRM0m, (ops i8mem :$dst, i8imm :$src), def MOV8mi : Ii8 <0xC6, MRM0m, (ops i8mem :$dst, i8imm :$src),
"mov{b} {$src, $dst|$dst, $src}", "mov{b} {$src, $dst|$dst, $src}",
[(store (i8 imm:$src), addr:$dst)]>; [(store (i8 imm:$src), addr:$dst)]>;

View File

@ -1666,6 +1666,7 @@ def MWAIT : I<0xC9, RawFrm, (ops), "mwait",
// Alias instructions that map zero vector to pxor / xorp* for sse. // Alias instructions that map zero vector to pxor / xorp* for sse.
// FIXME: remove when we can teach regalloc that xor reg, reg is ok. // FIXME: remove when we can teach regalloc that xor reg, reg is ok.
let isReMaterializable = 1 in {
def V_SET0 : PSI<0x57, MRMInitReg, (ops VR128:$dst), def V_SET0 : PSI<0x57, MRMInitReg, (ops VR128:$dst),
"xorps $dst, $dst", "xorps $dst, $dst",
[(set VR128:$dst, (v4f32 immAllZerosV))]>; [(set VR128:$dst, (v4f32 immAllZerosV))]>;
@ -1673,6 +1674,7 @@ def V_SET0 : PSI<0x57, MRMInitReg, (ops VR128:$dst),
def V_SETALLONES : PDI<0x76, MRMInitReg, (ops VR128:$dst), def V_SETALLONES : PDI<0x76, MRMInitReg, (ops VR128:$dst),
"pcmpeqd $dst, $dst", "pcmpeqd $dst, $dst",
[(set VR128:$dst, (v2f64 immAllOnesV))]>; [(set VR128:$dst, (v2f64 immAllOnesV))]>;
}
// FR32 / FR64 to 128-bit vector conversion. // FR32 / FR64 to 128-bit vector conversion.
def MOVSS2PSrr : SSI<0x10, MRMSrcReg, (ops VR128:$dst, FR32:$src), def MOVSS2PSrr : SSI<0x10, MRMSrcReg, (ops VR128:$dst, FR32:$src),