mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 22:43:29 +00:00
Change load PatFrag to ignore indexed load.
llvm-svn: 31210
This commit is contained in:
parent
88c050f772
commit
9048e1010b
@ -399,79 +399,110 @@ def vnot : PatFrag<(ops node:$in), (xor node:$in, immAllOnesV)>;
|
|||||||
def vnot_conv : PatFrag<(ops node:$in), (xor node:$in, immAllOnesV_bc)>;
|
def vnot_conv : PatFrag<(ops node:$in), (xor node:$in, immAllOnesV_bc)>;
|
||||||
def ineg : PatFrag<(ops node:$in), (sub 0, node:$in)>;
|
def ineg : PatFrag<(ops node:$in), (sub 0, node:$in)>;
|
||||||
|
|
||||||
|
// load fragments.
|
||||||
def load : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
def load : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
||||||
return ISD::isNON_EXTLoad(N);
|
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N))
|
||||||
|
return LD->getExtensionType() == ISD::NON_EXTLOAD &&
|
||||||
|
LD->getAddressingMode() == ISD::UNINDEXED;
|
||||||
|
return false;
|
||||||
}]>;
|
}]>;
|
||||||
|
|
||||||
// extending load fragments.
|
// extending load fragments.
|
||||||
def extloadi1 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
def extloadi1 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
||||||
if (ISD::isEXTLoad(N))
|
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N))
|
||||||
return cast<LoadSDNode>(N)->getLoadedVT() == MVT::i1;
|
return LD->getExtensionType() == ISD::EXTLOAD &&
|
||||||
|
LD->getAddressingMode() == ISD::UNINDEXED &&
|
||||||
|
LD->getLoadedVT() == MVT::i1;
|
||||||
return false;
|
return false;
|
||||||
}]>;
|
}]>;
|
||||||
def extloadi8 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
def extloadi8 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
||||||
if (ISD::isEXTLoad(N))
|
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N))
|
||||||
return cast<LoadSDNode>(N)->getLoadedVT() == MVT::i8;
|
return LD->getExtensionType() == ISD::EXTLOAD &&
|
||||||
|
LD->getAddressingMode() == ISD::UNINDEXED &&
|
||||||
|
LD->getLoadedVT() == MVT::i8;
|
||||||
return false;
|
return false;
|
||||||
}]>;
|
}]>;
|
||||||
def extloadi16 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
def extloadi16 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
||||||
if (ISD::isEXTLoad(N))
|
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N))
|
||||||
return cast<LoadSDNode>(N)->getLoadedVT() == MVT::i16;
|
return LD->getExtensionType() == ISD::EXTLOAD &&
|
||||||
|
LD->getAddressingMode() == ISD::UNINDEXED &&
|
||||||
|
LD->getLoadedVT() == MVT::i16;
|
||||||
return false;
|
return false;
|
||||||
}]>;
|
}]>;
|
||||||
def extloadi32 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
def extloadi32 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
||||||
if (ISD::isEXTLoad(N))
|
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N))
|
||||||
return cast<LoadSDNode>(N)->getLoadedVT() == MVT::i32;
|
return LD->getExtensionType() == ISD::EXTLOAD &&
|
||||||
|
LD->getAddressingMode() == ISD::UNINDEXED &&
|
||||||
|
LD->getLoadedVT() == MVT::i32;
|
||||||
return false;
|
return false;
|
||||||
}]>;
|
}]>;
|
||||||
def extloadf32 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
def extloadf32 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
||||||
if (ISD::isEXTLoad(N))
|
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N))
|
||||||
return cast<LoadSDNode>(N)->getLoadedVT() == MVT::f32;
|
return LD->getExtensionType() == ISD::EXTLOAD &&
|
||||||
|
LD->getAddressingMode() == ISD::UNINDEXED &&
|
||||||
|
LD->getLoadedVT() == MVT::f32;
|
||||||
return false;
|
return false;
|
||||||
}]>;
|
}]>;
|
||||||
|
|
||||||
def sextloadi1 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
def sextloadi1 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
||||||
if (ISD::isSEXTLoad(N))
|
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N))
|
||||||
return cast<LoadSDNode>(N)->getLoadedVT() == MVT::i1;
|
return LD->getExtensionType() == ISD::SEXTLOAD &&
|
||||||
|
LD->getAddressingMode() == ISD::UNINDEXED &&
|
||||||
|
LD->getLoadedVT() == MVT::i1;
|
||||||
return false;
|
return false;
|
||||||
}]>;
|
}]>;
|
||||||
def sextloadi8 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
def sextloadi8 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
||||||
if (ISD::isSEXTLoad(N))
|
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N))
|
||||||
return cast<LoadSDNode>(N)->getLoadedVT() == MVT::i8;
|
return LD->getExtensionType() == ISD::SEXTLOAD &&
|
||||||
|
LD->getAddressingMode() == ISD::UNINDEXED &&
|
||||||
|
LD->getLoadedVT() == MVT::i8;
|
||||||
return false;
|
return false;
|
||||||
}]>;
|
}]>;
|
||||||
def sextloadi16 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
def sextloadi16 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
||||||
if (ISD::isSEXTLoad(N))
|
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N))
|
||||||
return cast<LoadSDNode>(N)->getLoadedVT() == MVT::i16;
|
return LD->getExtensionType() == ISD::SEXTLOAD &&
|
||||||
|
LD->getAddressingMode() == ISD::UNINDEXED &&
|
||||||
|
LD->getLoadedVT() == MVT::i16;
|
||||||
return false;
|
return false;
|
||||||
}]>;
|
}]>;
|
||||||
def sextloadi32 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
def sextloadi32 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
||||||
if (ISD::isSEXTLoad(N))
|
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N))
|
||||||
return cast<LoadSDNode>(N)->getLoadedVT() == MVT::i32;
|
return LD->getExtensionType() == ISD::SEXTLOAD &&
|
||||||
|
LD->getAddressingMode() == ISD::UNINDEXED &&
|
||||||
|
LD->getLoadedVT() == MVT::i32;
|
||||||
return false;
|
return false;
|
||||||
}]>;
|
}]>;
|
||||||
|
|
||||||
def zextloadi1 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
def zextloadi1 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
||||||
if (ISD::isZEXTLoad(N))
|
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N))
|
||||||
return cast<LoadSDNode>(N)->getLoadedVT() == MVT::i1;
|
return LD->getExtensionType() == ISD::ZEXTLOAD &&
|
||||||
|
LD->getAddressingMode() == ISD::UNINDEXED &&
|
||||||
|
LD->getLoadedVT() == MVT::i1;
|
||||||
return false;
|
return false;
|
||||||
}]>;
|
}]>;
|
||||||
def zextloadi8 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
def zextloadi8 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
||||||
if (ISD::isZEXTLoad(N))
|
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N))
|
||||||
return cast<LoadSDNode>(N)->getLoadedVT() == MVT::i8;
|
return LD->getExtensionType() == ISD::ZEXTLOAD &&
|
||||||
|
LD->getAddressingMode() == ISD::UNINDEXED &&
|
||||||
|
LD->getLoadedVT() == MVT::i8;
|
||||||
return false;
|
return false;
|
||||||
}]>;
|
}]>;
|
||||||
def zextloadi16 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
def zextloadi16 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
||||||
if (ISD::isZEXTLoad(N))
|
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N))
|
||||||
return cast<LoadSDNode>(N)->getLoadedVT() == MVT::i16;
|
return LD->getExtensionType() == ISD::ZEXTLOAD &&
|
||||||
|
LD->getAddressingMode() == ISD::UNINDEXED &&
|
||||||
|
LD->getLoadedVT() == MVT::i16;
|
||||||
return false;
|
return false;
|
||||||
}]>;
|
}]>;
|
||||||
def zextloadi32 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
def zextloadi32 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
|
||||||
if (ISD::isZEXTLoad(N))
|
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N))
|
||||||
return cast<LoadSDNode>(N)->getLoadedVT() == MVT::i32;
|
return LD->getExtensionType() == ISD::ZEXTLOAD &&
|
||||||
|
LD->getAddressingMode() == ISD::UNINDEXED &&
|
||||||
|
LD->getLoadedVT() == MVT::i32;
|
||||||
return false;
|
return false;
|
||||||
}]>;
|
}]>;
|
||||||
|
|
||||||
|
// store fragments.
|
||||||
def store : PatFrag<(ops node:$val, node:$ptr),
|
def store : PatFrag<(ops node:$val, node:$ptr),
|
||||||
(st node:$val, node:$ptr), [{
|
(st node:$val, node:$ptr), [{
|
||||||
return ISD::isNON_TRUNCStore(N);
|
return ISD::isNON_TRUNCStore(N);
|
||||||
|
Loading…
Reference in New Issue
Block a user