mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Add AVX versions of FsMOVAPS and FsMOVAPS. Teach X86InstrInfo how to use
it! llvm-svn: 139063
This commit is contained in:
parent
eb041875c1
commit
ea1931b9d0
@ -278,6 +278,8 @@ X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
|
||||
{ X86::EXTRACTPSrr, X86::EXTRACTPSmr, 0, 16 },
|
||||
{ X86::FsMOVAPDrr, X86::MOVSDmr | TB_NOT_REVERSABLE , 0, 0 },
|
||||
{ X86::FsMOVAPSrr, X86::MOVSSmr | TB_NOT_REVERSABLE , 0, 0 },
|
||||
{ X86::FsVMOVAPDrr, X86::VMOVSDmr | TB_NOT_REVERSABLE , 0, 0 },
|
||||
{ X86::FsVMOVAPSrr, X86::VMOVSSmr | TB_NOT_REVERSABLE , 0, 0 },
|
||||
{ X86::IDIV16r, X86::IDIV16m, 1, 0 },
|
||||
{ X86::IDIV32r, X86::IDIV32m, 1, 0 },
|
||||
{ X86::IDIV64r, X86::IDIV64m, 1, 0 },
|
||||
@ -375,6 +377,8 @@ X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
|
||||
{ X86::CVTTSS2SIrr, X86::CVTTSS2SIrm, 0 },
|
||||
{ X86::FsMOVAPDrr, X86::MOVSDrm | TB_NOT_REVERSABLE , 0 },
|
||||
{ X86::FsMOVAPSrr, X86::MOVSSrm | TB_NOT_REVERSABLE , 0 },
|
||||
{ X86::FsVMOVAPDrr, X86::VMOVSDrm | TB_NOT_REVERSABLE , 0 },
|
||||
{ X86::FsVMOVAPSrr, X86::VMOVSSrm | TB_NOT_REVERSABLE , 0 },
|
||||
{ X86::IMUL16rri, X86::IMUL16rmi, 0 },
|
||||
{ X86::IMUL16rri8, X86::IMUL16rmi8, 0 },
|
||||
{ X86::IMUL32rri, X86::IMUL32rmi, 0 },
|
||||
@ -913,6 +917,8 @@ X86InstrInfo::isReallyTriviallyReMaterializable(const MachineInstr *MI,
|
||||
case X86::VMOVDQAYrm:
|
||||
case X86::MMX_MOVD64rm:
|
||||
case X86::MMX_MOVQ64rm:
|
||||
case X86::FsVMOVAPSrm:
|
||||
case X86::FsVMOVAPDrm:
|
||||
case X86::FsMOVAPSrm:
|
||||
case X86::FsMOVAPDrm: {
|
||||
// Loads from constant pools are trivially rematerializable.
|
||||
@ -2856,6 +2862,8 @@ X86InstrInfo::areLoadsFromSameBasePtr(SDNode *Load1, SDNode *Load2,
|
||||
case X86::MMX_MOVQ64rm:
|
||||
case X86::FsMOVAPSrm:
|
||||
case X86::FsMOVAPDrm:
|
||||
case X86::FsVMOVAPSrm:
|
||||
case X86::FsVMOVAPDrm:
|
||||
case X86::MOVAPSrm:
|
||||
case X86::MOVUPSrm:
|
||||
case X86::MOVAPDrm:
|
||||
@ -2883,6 +2891,8 @@ X86InstrInfo::areLoadsFromSameBasePtr(SDNode *Load1, SDNode *Load2,
|
||||
case X86::MMX_MOVQ64rm:
|
||||
case X86::FsMOVAPSrm:
|
||||
case X86::FsMOVAPDrm:
|
||||
case X86::FsVMOVAPSrm:
|
||||
case X86::FsVMOVAPDrm:
|
||||
case X86::MOVAPSrm:
|
||||
case X86::MOVUPSrm:
|
||||
case X86::MOVAPDrm:
|
||||
|
@ -2457,9 +2457,9 @@ let Predicates = [HasAVX] in {
|
||||
// names that start with 'Fs'.
|
||||
|
||||
// Alias instructions that map fld0 to pxor for sse.
|
||||
// FIXME: Set encoding to pseudo!
|
||||
let isReMaterializable = 1, isAsCheapAsAMove = 1, isCodeGenOnly = 1,
|
||||
canFoldAsLoad = 1 in {
|
||||
// FIXME: Set encoding to pseudo!
|
||||
def FsFLD0SS : I<0xEF, MRMInitReg, (outs FR32:$dst), (ins), "",
|
||||
[(set FR32:$dst, fp32imm0)]>,
|
||||
Requires<[HasSSE1]>, TB, OpSize;
|
||||
@ -2475,16 +2475,20 @@ let isReMaterializable = 1, isAsCheapAsAMove = 1, isCodeGenOnly = 1,
|
||||
}
|
||||
|
||||
// Alias instruction to do FR32 or FR64 reg-to-reg copy using movaps. Upper
|
||||
// bits are disregarded.
|
||||
// bits are disregarded. FIXME: Set encoding to pseudo!
|
||||
let neverHasSideEffects = 1 in {
|
||||
def FsMOVAPSrr : PSI<0x28, MRMSrcReg, (outs FR32:$dst), (ins FR32:$src),
|
||||
"movaps\t{$src, $dst|$dst, $src}", []>;
|
||||
def FsMOVAPDrr : PDI<0x28, MRMSrcReg, (outs FR64:$dst), (ins FR64:$src),
|
||||
"movapd\t{$src, $dst|$dst, $src}", []>;
|
||||
def FsVMOVAPSrr : VPSI<0x28, MRMSrcReg, (outs FR32:$dst), (ins FR32:$src),
|
||||
"movaps\t{$src, $dst|$dst, $src}", []>, VEX;
|
||||
def FsVMOVAPDrr : VPDI<0x28, MRMSrcReg, (outs FR64:$dst), (ins FR64:$src),
|
||||
"movapd\t{$src, $dst|$dst, $src}", []>, VEX;
|
||||
}
|
||||
|
||||
// Alias instruction to load FR32 or FR64 from f128mem using movaps. Upper
|
||||
// bits are disregarded.
|
||||
// bits are disregarded. FIXME: Set encoding to pseudo!
|
||||
let canFoldAsLoad = 1, isReMaterializable = 1 in {
|
||||
def FsMOVAPSrm : PSI<0x28, MRMSrcMem, (outs FR32:$dst), (ins f128mem:$src),
|
||||
"movaps\t{$src, $dst|$dst, $src}",
|
||||
@ -2492,6 +2496,14 @@ def FsMOVAPSrm : PSI<0x28, MRMSrcMem, (outs FR32:$dst), (ins f128mem:$src),
|
||||
def FsMOVAPDrm : PDI<0x28, MRMSrcMem, (outs FR64:$dst), (ins f128mem:$src),
|
||||
"movapd\t{$src, $dst|$dst, $src}",
|
||||
[(set FR64:$dst, (alignedloadfsf64 addr:$src))]>;
|
||||
let isCodeGenOnly = 1 in {
|
||||
def FsVMOVAPSrm : VPSI<0x28, MRMSrcMem, (outs FR32:$dst), (ins f128mem:$src),
|
||||
"movaps\t{$src, $dst|$dst, $src}",
|
||||
[(set FR32:$dst, (alignedloadfsf32 addr:$src))]>, VEX;
|
||||
def FsVMOVAPDrm : VPDI<0x28, MRMSrcMem, (outs FR64:$dst), (ins f128mem:$src),
|
||||
"movapd\t{$src, $dst|$dst, $src}",
|
||||
[(set FR64:$dst, (alignedloadfsf64 addr:$src))]>, VEX;
|
||||
}
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Loading…
Reference in New Issue
Block a user