mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
ComplexPatterns sse_load_f32 and sse_load_f64 returns in / out chain operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30892 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
af9db75943
commit
82a9164fb4
@ -148,7 +148,8 @@ namespace {
|
|||||||
bool SelectLEAAddr(SDOperand N, SDOperand &Base, SDOperand &Scale,
|
bool SelectLEAAddr(SDOperand N, SDOperand &Base, SDOperand &Scale,
|
||||||
SDOperand &Index, SDOperand &Disp);
|
SDOperand &Index, SDOperand &Disp);
|
||||||
bool SelectScalarSSELoad(SDOperand N, SDOperand &Base, SDOperand &Scale,
|
bool SelectScalarSSELoad(SDOperand N, SDOperand &Base, SDOperand &Scale,
|
||||||
SDOperand &Index, SDOperand &Disp);
|
SDOperand &Index, SDOperand &Disp,
|
||||||
|
SDOperand &InChain, SDOperand &OutChain);
|
||||||
bool TryFoldLoad(SDOperand P, SDOperand N,
|
bool TryFoldLoad(SDOperand P, SDOperand N,
|
||||||
SDOperand &Base, SDOperand &Scale,
|
SDOperand &Base, SDOperand &Scale,
|
||||||
SDOperand &Index, SDOperand &Disp);
|
SDOperand &Index, SDOperand &Disp);
|
||||||
@ -781,20 +782,22 @@ bool X86DAGToDAGISel::SelectAddr(SDOperand N, SDOperand &Base, SDOperand &Scale,
|
|||||||
/// match a load whose top elements are either undef or zeros. The load flavor
|
/// match a load whose top elements are either undef or zeros. The load flavor
|
||||||
/// is derived from the type of N, which is either v4f32 or v2f64.
|
/// is derived from the type of N, which is either v4f32 or v2f64.
|
||||||
bool X86DAGToDAGISel::SelectScalarSSELoad(SDOperand N, SDOperand &Base,
|
bool X86DAGToDAGISel::SelectScalarSSELoad(SDOperand N, SDOperand &Base,
|
||||||
SDOperand &Scale,
|
SDOperand &Scale, SDOperand &Index,
|
||||||
SDOperand &Index, SDOperand &Disp) {
|
SDOperand &Disp, SDOperand &InChain,
|
||||||
#if 0
|
SDOperand &OutChain) {
|
||||||
if (N.getOpcode() == ISD::SCALAR_TO_VECTOR) {
|
if (N.getOpcode() == ISD::SCALAR_TO_VECTOR) {
|
||||||
if (N.getOperand(0).getOpcode() == ISD::LOAD) {
|
InChain = N.getOperand(0);
|
||||||
SDOperand LoadAddr = N.getOperand(0).getOperand(0);
|
if (ISD::isNON_EXTLoad(InChain.Val)) {
|
||||||
|
LoadSDNode *LD = cast<LoadSDNode>(InChain);
|
||||||
|
SDOperand LoadAddr = LD->getBasePtr();
|
||||||
if (!SelectAddr(LoadAddr, Base, Scale, Index, Disp))
|
if (!SelectAddr(LoadAddr, Base, Scale, Index, Disp))
|
||||||
return false;
|
return false;
|
||||||
|
OutChain = LD->getChain();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: Also handle the case where we explicitly require zeros in the top
|
// TODO: Also handle the case where we explicitly require zeros in the top
|
||||||
// elements. This is a vector shuffle from the zero vector.
|
// elements. This is a vector shuffle from the zero vector.
|
||||||
#endif
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -39,8 +39,10 @@ def X86pinsrw : SDNode<"X86ISD::PINSRW", SDTypeProfile<1, 3, []>, []>;
|
|||||||
// These are 'extloads' from a scalar to the low element of a vector, zeroing
|
// These are 'extloads' from a scalar to the low element of a vector, zeroing
|
||||||
// the top elements. These are used for the SSE 'ss' and 'sd' instruction
|
// the top elements. These are used for the SSE 'ss' and 'sd' instruction
|
||||||
// forms.
|
// forms.
|
||||||
def sse_load_f32 : ComplexPattern<v4f32, 4, "SelectScalarSSELoad", []>;
|
def sse_load_f32 : ComplexPattern<v4f32, 4, "SelectScalarSSELoad", [],
|
||||||
def sse_load_f64 : ComplexPattern<v2f64, 4, "SelectScalarSSELoad", []>;
|
[SDNPHasChain]>;
|
||||||
|
def sse_load_f64 : ComplexPattern<v2f64, 4, "SelectScalarSSELoad", [],
|
||||||
|
[SDNPHasChain]>;
|
||||||
|
|
||||||
def ssmem : Operand<v4f32> {
|
def ssmem : Operand<v4f32> {
|
||||||
let PrintMethod = "printf32mem";
|
let PrintMethod = "printf32mem";
|
||||||
|
Loading…
Reference in New Issue
Block a user