mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-14 00:14:19 +00:00
Swap VT and DebugLoc operands of getExtLoad() for consistency with
other getNode() methods. Radar 9002173. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125665 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5a287d7a03
commit
a901129169
@ -634,7 +634,7 @@ public:
|
||||
MachinePointerInfo PtrInfo, bool isVolatile,
|
||||
bool isNonTemporal, unsigned Alignment,
|
||||
const MDNode *TBAAInfo = 0);
|
||||
SDValue getExtLoad(ISD::LoadExtType ExtType, EVT VT, DebugLoc dl,
|
||||
SDValue getExtLoad(ISD::LoadExtType ExtType, DebugLoc dl, EVT VT,
|
||||
SDValue Chain, SDValue Ptr, MachinePointerInfo PtrInfo,
|
||||
EVT MemVT, bool isVolatile,
|
||||
bool isNonTemporal, unsigned Alignment,
|
||||
|
@ -674,7 +674,7 @@ SDValue DAGCombiner::PromoteOperand(SDValue Op, EVT PVT, bool &Replace) {
|
||||
: ISD::EXTLOAD)
|
||||
: LD->getExtensionType();
|
||||
Replace = true;
|
||||
return DAG.getExtLoad(ExtType, PVT, dl,
|
||||
return DAG.getExtLoad(ExtType, dl, PVT,
|
||||
LD->getChain(), LD->getBasePtr(),
|
||||
LD->getPointerInfo(),
|
||||
MemVT, LD->isVolatile(),
|
||||
@ -897,7 +897,7 @@ bool DAGCombiner::PromoteLoad(SDValue Op) {
|
||||
? (TLI.isLoadExtLegal(ISD::ZEXTLOAD, MemVT) ? ISD::ZEXTLOAD
|
||||
: ISD::EXTLOAD)
|
||||
: LD->getExtensionType();
|
||||
SDValue NewLD = DAG.getExtLoad(ExtType, PVT, dl,
|
||||
SDValue NewLD = DAG.getExtLoad(ExtType, dl, PVT,
|
||||
LD->getChain(), LD->getBasePtr(),
|
||||
LD->getPointerInfo(),
|
||||
MemVT, LD->isVolatile(),
|
||||
@ -2327,7 +2327,7 @@ SDValue DAGCombiner::visitAND(SDNode *N) {
|
||||
BitWidth - MemVT.getScalarType().getSizeInBits())) &&
|
||||
((!LegalOperations && !LN0->isVolatile()) ||
|
||||
TLI.isLoadExtLegal(ISD::ZEXTLOAD, MemVT))) {
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, N0.getDebugLoc(),
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, N0.getDebugLoc(), VT,
|
||||
LN0->getChain(), LN0->getBasePtr(),
|
||||
LN0->getPointerInfo(), MemVT,
|
||||
LN0->isVolatile(), LN0->isNonTemporal(),
|
||||
@ -2349,7 +2349,7 @@ SDValue DAGCombiner::visitAND(SDNode *N) {
|
||||
BitWidth - MemVT.getScalarType().getSizeInBits())) &&
|
||||
((!LegalOperations && !LN0->isVolatile()) ||
|
||||
TLI.isLoadExtLegal(ISD::ZEXTLOAD, MemVT))) {
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, N0.getDebugLoc(),
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, N0.getDebugLoc(), VT,
|
||||
LN0->getChain(),
|
||||
LN0->getBasePtr(), LN0->getPointerInfo(),
|
||||
MemVT,
|
||||
@ -2383,7 +2383,7 @@ SDValue DAGCombiner::visitAND(SDNode *N) {
|
||||
EVT LoadResultTy = HasAnyExt ? LN0->getValueType(0) : VT;
|
||||
|
||||
SDValue NewLoad =
|
||||
DAG.getExtLoad(ISD::ZEXTLOAD, LoadResultTy, LN0->getDebugLoc(),
|
||||
DAG.getExtLoad(ISD::ZEXTLOAD, LN0->getDebugLoc(), LoadResultTy,
|
||||
LN0->getChain(), LN0->getBasePtr(),
|
||||
LN0->getPointerInfo(),
|
||||
ExtVT, LN0->isVolatile(), LN0->isNonTemporal(),
|
||||
@ -2419,7 +2419,7 @@ SDValue DAGCombiner::visitAND(SDNode *N) {
|
||||
|
||||
EVT LoadResultTy = HasAnyExt ? LN0->getValueType(0) : VT;
|
||||
SDValue Load =
|
||||
DAG.getExtLoad(ISD::ZEXTLOAD, LoadResultTy, LN0->getDebugLoc(),
|
||||
DAG.getExtLoad(ISD::ZEXTLOAD, LN0->getDebugLoc(), LoadResultTy,
|
||||
LN0->getChain(), NewPtr,
|
||||
LN0->getPointerInfo(),
|
||||
ExtVT, LN0->isVolatile(), LN0->isNonTemporal(),
|
||||
@ -3694,7 +3694,7 @@ SDValue DAGCombiner::visitSIGN_EXTEND(SDNode *N) {
|
||||
DoXform = ExtendUsesToFormExtLoad(N, N0, ISD::SIGN_EXTEND, SetCCs, TLI);
|
||||
if (DoXform) {
|
||||
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, VT, N->getDebugLoc(),
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, N->getDebugLoc(), VT,
|
||||
LN0->getChain(),
|
||||
LN0->getBasePtr(), LN0->getPointerInfo(),
|
||||
N0.getValueType(),
|
||||
@ -3737,7 +3737,7 @@ SDValue DAGCombiner::visitSIGN_EXTEND(SDNode *N) {
|
||||
EVT MemVT = LN0->getMemoryVT();
|
||||
if ((!LegalOperations && !LN0->isVolatile()) ||
|
||||
TLI.isLoadExtLegal(ISD::SEXTLOAD, MemVT)) {
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, VT, N->getDebugLoc(),
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, N->getDebugLoc(), VT,
|
||||
LN0->getChain(),
|
||||
LN0->getBasePtr(), LN0->getPointerInfo(),
|
||||
MemVT,
|
||||
@ -3896,7 +3896,7 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
|
||||
DoXform = ExtendUsesToFormExtLoad(N, N0, ISD::ZERO_EXTEND, SetCCs, TLI);
|
||||
if (DoXform) {
|
||||
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, N->getDebugLoc(),
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, N->getDebugLoc(), VT,
|
||||
LN0->getChain(),
|
||||
LN0->getBasePtr(), LN0->getPointerInfo(),
|
||||
N0.getValueType(),
|
||||
@ -3939,7 +3939,7 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
|
||||
EVT MemVT = LN0->getMemoryVT();
|
||||
if ((!LegalOperations && !LN0->isVolatile()) ||
|
||||
TLI.isLoadExtLegal(ISD::ZEXTLOAD, MemVT)) {
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, N->getDebugLoc(),
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, N->getDebugLoc(), VT,
|
||||
LN0->getChain(),
|
||||
LN0->getBasePtr(), LN0->getPointerInfo(),
|
||||
MemVT,
|
||||
@ -4103,7 +4103,7 @@ SDValue DAGCombiner::visitANY_EXTEND(SDNode *N) {
|
||||
DoXform = ExtendUsesToFormExtLoad(N, N0, ISD::ANY_EXTEND, SetCCs, TLI);
|
||||
if (DoXform) {
|
||||
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::EXTLOAD, VT, N->getDebugLoc(),
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::EXTLOAD, N->getDebugLoc(), VT,
|
||||
LN0->getChain(),
|
||||
LN0->getBasePtr(), LN0->getPointerInfo(),
|
||||
N0.getValueType(),
|
||||
@ -4146,9 +4146,8 @@ SDValue DAGCombiner::visitANY_EXTEND(SDNode *N) {
|
||||
N0.hasOneUse()) {
|
||||
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
|
||||
EVT MemVT = LN0->getMemoryVT();
|
||||
SDValue ExtLoad = DAG.getExtLoad(LN0->getExtensionType(), VT,
|
||||
N->getDebugLoc(),
|
||||
LN0->getChain(), LN0->getBasePtr(),
|
||||
SDValue ExtLoad = DAG.getExtLoad(LN0->getExtensionType(), N->getDebugLoc(),
|
||||
VT, LN0->getChain(), LN0->getBasePtr(),
|
||||
LN0->getPointerInfo(), MemVT,
|
||||
LN0->isVolatile(), LN0->isNonTemporal(),
|
||||
LN0->getAlignment());
|
||||
@ -4350,7 +4349,7 @@ SDValue DAGCombiner::ReduceLoadWidth(SDNode *N) {
|
||||
LN0->getPointerInfo().getWithOffset(PtrOff),
|
||||
LN0->isVolatile(), LN0->isNonTemporal(), NewAlign);
|
||||
else
|
||||
Load = DAG.getExtLoad(ExtType, VT, N0.getDebugLoc(), LN0->getChain(),NewPtr,
|
||||
Load = DAG.getExtLoad(ExtType, N0.getDebugLoc(), VT, LN0->getChain(),NewPtr,
|
||||
LN0->getPointerInfo().getWithOffset(PtrOff),
|
||||
ExtVT, LN0->isVolatile(), LN0->isNonTemporal(),
|
||||
NewAlign);
|
||||
@ -4444,7 +4443,7 @@ SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
|
||||
((!LegalOperations && !cast<LoadSDNode>(N0)->isVolatile()) ||
|
||||
TLI.isLoadExtLegal(ISD::SEXTLOAD, EVT))) {
|
||||
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, VT, N->getDebugLoc(),
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, N->getDebugLoc(), VT,
|
||||
LN0->getChain(),
|
||||
LN0->getBasePtr(), LN0->getPointerInfo(),
|
||||
EVT,
|
||||
@ -4461,7 +4460,7 @@ SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
|
||||
((!LegalOperations && !cast<LoadSDNode>(N0)->isVolatile()) ||
|
||||
TLI.isLoadExtLegal(ISD::SEXTLOAD, EVT))) {
|
||||
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, VT, N->getDebugLoc(),
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, N->getDebugLoc(), VT,
|
||||
LN0->getChain(),
|
||||
LN0->getBasePtr(), LN0->getPointerInfo(),
|
||||
EVT,
|
||||
@ -5233,7 +5232,7 @@ SDValue DAGCombiner::visitFP_EXTEND(SDNode *N) {
|
||||
((!LegalOperations && !cast<LoadSDNode>(N0)->isVolatile()) ||
|
||||
TLI.isLoadExtLegal(ISD::EXTLOAD, N0.getValueType()))) {
|
||||
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::EXTLOAD, VT, N->getDebugLoc(),
|
||||
SDValue ExtLoad = DAG.getExtLoad(ISD::EXTLOAD, N->getDebugLoc(), VT,
|
||||
LN0->getChain(),
|
||||
LN0->getBasePtr(), LN0->getPointerInfo(),
|
||||
N0.getValueType(),
|
||||
@ -5821,8 +5820,8 @@ SDValue DAGCombiner::visitLOAD(SDNode *N) {
|
||||
if (OptLevel != CodeGenOpt::None && LD->isUnindexed()) {
|
||||
if (unsigned Align = DAG.InferPtrAlignment(Ptr)) {
|
||||
if (Align > LD->getAlignment())
|
||||
return DAG.getExtLoad(LD->getExtensionType(), LD->getValueType(0),
|
||||
N->getDebugLoc(),
|
||||
return DAG.getExtLoad(LD->getExtensionType(), N->getDebugLoc(),
|
||||
LD->getValueType(0),
|
||||
Chain, Ptr, LD->getPointerInfo(),
|
||||
LD->getMemoryVT(),
|
||||
LD->isVolatile(), LD->isNonTemporal(), Align);
|
||||
@ -5844,8 +5843,8 @@ SDValue DAGCombiner::visitLOAD(SDNode *N) {
|
||||
LD->isVolatile(), LD->isNonTemporal(),
|
||||
LD->getAlignment());
|
||||
} else {
|
||||
ReplLoad = DAG.getExtLoad(LD->getExtensionType(), LD->getValueType(0),
|
||||
LD->getDebugLoc(),
|
||||
ReplLoad = DAG.getExtLoad(LD->getExtensionType(), LD->getDebugLoc(),
|
||||
LD->getValueType(0),
|
||||
BetterChain, Ptr, LD->getPointerInfo(),
|
||||
LD->getMemoryVT(),
|
||||
LD->isVolatile(),
|
||||
@ -6970,8 +6969,8 @@ bool DAGCombiner::SimplifySelectOps(SDNode *TheSelect, SDValue LHS,
|
||||
} else {
|
||||
Load = DAG.getExtLoad(LLD->getExtensionType() == ISD::EXTLOAD ?
|
||||
RLD->getExtensionType() : LLD->getExtensionType(),
|
||||
TheSelect->getValueType(0),
|
||||
TheSelect->getDebugLoc(),
|
||||
TheSelect->getValueType(0),
|
||||
// FIXME: Discards pointer info.
|
||||
LLD->getChain(), Addr, MachinePointerInfo(),
|
||||
LLD->getMemoryVT(), LLD->isVolatile(),
|
||||
|
@ -394,7 +394,7 @@ static SDValue ExpandConstantFP(ConstantFPSDNode *CFP, bool UseCP,
|
||||
SDValue CPIdx = DAG.getConstantPool(LLVMC, TLI.getPointerTy());
|
||||
unsigned Alignment = cast<ConstantPoolSDNode>(CPIdx)->getAlignment();
|
||||
if (Extend)
|
||||
return DAG.getExtLoad(ISD::EXTLOAD, OrigVT, dl,
|
||||
return DAG.getExtLoad(ISD::EXTLOAD, dl, OrigVT,
|
||||
DAG.getEntryNode(),
|
||||
CPIdx, MachinePointerInfo::getConstantPool(),
|
||||
VT, false, false, Alignment);
|
||||
@ -471,7 +471,7 @@ SDValue ExpandUnalignedStore(StoreSDNode *ST, SelectionDAG &DAG,
|
||||
8 * (StoredBytes - Offset));
|
||||
|
||||
// Load from the stack slot.
|
||||
SDValue Load = DAG.getExtLoad(ISD::EXTLOAD, RegVT, dl, Store, StackPtr,
|
||||
SDValue Load = DAG.getExtLoad(ISD::EXTLOAD, dl, RegVT, Store, StackPtr,
|
||||
MachinePointerInfo(),
|
||||
MemVT, false, false, 0);
|
||||
|
||||
@ -575,7 +575,7 @@ SDValue ExpandUnalignedLoad(LoadSDNode *LD, SelectionDAG &DAG,
|
||||
// The last copy may be partial. Do an extending load.
|
||||
EVT MemVT = EVT::getIntegerVT(*DAG.getContext(),
|
||||
8 * (LoadedBytes - Offset));
|
||||
SDValue Load = DAG.getExtLoad(ISD::EXTLOAD, RegVT, dl, Chain, Ptr,
|
||||
SDValue Load = DAG.getExtLoad(ISD::EXTLOAD, dl, RegVT, Chain, Ptr,
|
||||
LD->getPointerInfo().getWithOffset(Offset),
|
||||
MemVT, LD->isVolatile(),
|
||||
LD->isNonTemporal(),
|
||||
@ -592,7 +592,7 @@ SDValue ExpandUnalignedLoad(LoadSDNode *LD, SelectionDAG &DAG,
|
||||
Stores.size());
|
||||
|
||||
// Finally, perform the original load only redirected to the stack slot.
|
||||
Load = DAG.getExtLoad(LD->getExtensionType(), VT, dl, TF, StackBase,
|
||||
Load = DAG.getExtLoad(LD->getExtensionType(), dl, VT, TF, StackBase,
|
||||
MachinePointerInfo(), LoadedVT, false, false, 0);
|
||||
|
||||
// Callers expect a MERGE_VALUES node.
|
||||
@ -620,22 +620,22 @@ SDValue ExpandUnalignedLoad(LoadSDNode *LD, SelectionDAG &DAG,
|
||||
// Load the value in two parts
|
||||
SDValue Lo, Hi;
|
||||
if (TLI.isLittleEndian()) {
|
||||
Lo = DAG.getExtLoad(ISD::ZEXTLOAD, VT, dl, Chain, Ptr, LD->getPointerInfo(),
|
||||
Lo = DAG.getExtLoad(ISD::ZEXTLOAD, dl, VT, Chain, Ptr, LD->getPointerInfo(),
|
||||
NewLoadedVT, LD->isVolatile(),
|
||||
LD->isNonTemporal(), Alignment);
|
||||
Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr,
|
||||
DAG.getConstant(IncrementSize, TLI.getPointerTy()));
|
||||
Hi = DAG.getExtLoad(HiExtType, VT, dl, Chain, Ptr,
|
||||
Hi = DAG.getExtLoad(HiExtType, dl, VT, Chain, Ptr,
|
||||
LD->getPointerInfo().getWithOffset(IncrementSize),
|
||||
NewLoadedVT, LD->isVolatile(),
|
||||
LD->isNonTemporal(), MinAlign(Alignment,IncrementSize));
|
||||
} else {
|
||||
Hi = DAG.getExtLoad(HiExtType, VT, dl, Chain, Ptr, LD->getPointerInfo(),
|
||||
Hi = DAG.getExtLoad(HiExtType, dl, VT, Chain, Ptr, LD->getPointerInfo(),
|
||||
NewLoadedVT, LD->isVolatile(),
|
||||
LD->isNonTemporal(), Alignment);
|
||||
Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr,
|
||||
DAG.getConstant(IncrementSize, TLI.getPointerTy()));
|
||||
Lo = DAG.getExtLoad(ISD::ZEXTLOAD, VT, dl, Chain, Ptr,
|
||||
Lo = DAG.getExtLoad(ISD::ZEXTLOAD, dl, VT, Chain, Ptr,
|
||||
LD->getPointerInfo().getWithOffset(IncrementSize),
|
||||
NewLoadedVT, LD->isVolatile(),
|
||||
LD->isNonTemporal(), MinAlign(Alignment,IncrementSize));
|
||||
@ -1204,7 +1204,7 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
|
||||
ISD::LoadExtType NewExtType =
|
||||
ExtType == ISD::ZEXTLOAD ? ISD::ZEXTLOAD : ISD::EXTLOAD;
|
||||
|
||||
Result = DAG.getExtLoad(NewExtType, Node->getValueType(0), dl,
|
||||
Result = DAG.getExtLoad(NewExtType, dl, Node->getValueType(0),
|
||||
Tmp1, Tmp2, LD->getPointerInfo(),
|
||||
NVT, isVolatile, isNonTemporal, Alignment);
|
||||
|
||||
@ -1240,7 +1240,7 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
|
||||
if (TLI.isLittleEndian()) {
|
||||
// EXTLOAD:i24 -> ZEXTLOAD:i16 | (shl EXTLOAD@+2:i8, 16)
|
||||
// Load the bottom RoundWidth bits.
|
||||
Lo = DAG.getExtLoad(ISD::ZEXTLOAD, Node->getValueType(0), dl,
|
||||
Lo = DAG.getExtLoad(ISD::ZEXTLOAD, dl, Node->getValueType(0),
|
||||
Tmp1, Tmp2,
|
||||
LD->getPointerInfo(), RoundVT, isVolatile,
|
||||
isNonTemporal, Alignment);
|
||||
@ -1249,7 +1249,7 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
|
||||
IncrementSize = RoundWidth / 8;
|
||||
Tmp2 = DAG.getNode(ISD::ADD, dl, Tmp2.getValueType(), Tmp2,
|
||||
DAG.getIntPtrConstant(IncrementSize));
|
||||
Hi = DAG.getExtLoad(ExtType, Node->getValueType(0), dl, Tmp1, Tmp2,
|
||||
Hi = DAG.getExtLoad(ExtType, dl, Node->getValueType(0), Tmp1, Tmp2,
|
||||
LD->getPointerInfo().getWithOffset(IncrementSize),
|
||||
ExtraVT, isVolatile, isNonTemporal,
|
||||
MinAlign(Alignment, IncrementSize));
|
||||
@ -1269,7 +1269,7 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
|
||||
// Big endian - avoid unaligned loads.
|
||||
// EXTLOAD:i24 -> (shl EXTLOAD:i16, 8) | ZEXTLOAD@+2:i8
|
||||
// Load the top RoundWidth bits.
|
||||
Hi = DAG.getExtLoad(ExtType, Node->getValueType(0), dl, Tmp1, Tmp2,
|
||||
Hi = DAG.getExtLoad(ExtType, dl, Node->getValueType(0), Tmp1, Tmp2,
|
||||
LD->getPointerInfo(), RoundVT, isVolatile,
|
||||
isNonTemporal, Alignment);
|
||||
|
||||
@ -1278,7 +1278,7 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
|
||||
Tmp2 = DAG.getNode(ISD::ADD, dl, Tmp2.getValueType(), Tmp2,
|
||||
DAG.getIntPtrConstant(IncrementSize));
|
||||
Lo = DAG.getExtLoad(ISD::ZEXTLOAD,
|
||||
Node->getValueType(0), dl, Tmp1, Tmp2,
|
||||
dl, Node->getValueType(0), Tmp1, Tmp2,
|
||||
LD->getPointerInfo().getWithOffset(IncrementSize),
|
||||
ExtraVT, isVolatile, isNonTemporal,
|
||||
MinAlign(Alignment, IncrementSize));
|
||||
@ -1365,7 +1365,7 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
|
||||
"EXTLOAD should always be supported!");
|
||||
// Turn the unsupported load into an EXTLOAD followed by an explicit
|
||||
// zero/sign extend inreg.
|
||||
Result = DAG.getExtLoad(ISD::EXTLOAD, Node->getValueType(0), dl,
|
||||
Result = DAG.getExtLoad(ISD::EXTLOAD, dl, Node->getValueType(0),
|
||||
Tmp1, Tmp2, LD->getPointerInfo(), SrcVT,
|
||||
LD->isVolatile(), LD->isNonTemporal(),
|
||||
LD->getAlignment());
|
||||
@ -1580,7 +1580,7 @@ SDValue SelectionDAGLegalize::ExpandExtractFromVectorThroughStack(SDValue Op) {
|
||||
if (Op.getValueType().isVector())
|
||||
return DAG.getLoad(Op.getValueType(), dl, Ch, StackPtr,MachinePointerInfo(),
|
||||
false, false, 0);
|
||||
return DAG.getExtLoad(ISD::EXTLOAD, Op.getValueType(), dl, Ch, StackPtr,
|
||||
return DAG.getExtLoad(ISD::EXTLOAD, dl, Op.getValueType(), Ch, StackPtr,
|
||||
MachinePointerInfo(),
|
||||
Vec.getValueType().getVectorElementType(),
|
||||
false, false, 0);
|
||||
@ -1861,7 +1861,7 @@ SDValue SelectionDAGLegalize::EmitStackConvert(SDValue SrcOp,
|
||||
false, false, DestAlign);
|
||||
|
||||
assert(SlotSize < DestSize && "Unknown extension!");
|
||||
return DAG.getExtLoad(ISD::EXTLOAD, DestVT, dl, Store, FIPtr,
|
||||
return DAG.getExtLoad(ISD::EXTLOAD, dl, DestVT, Store, FIPtr,
|
||||
PtrInfo, SlotVT, false, false, DestAlign);
|
||||
}
|
||||
|
||||
@ -2288,7 +2288,7 @@ SDValue SelectionDAGLegalize::ExpandLegalINT_TO_FP(bool isSigned,
|
||||
false, false, Alignment);
|
||||
else {
|
||||
FudgeInReg =
|
||||
LegalizeOp(DAG.getExtLoad(ISD::EXTLOAD, DestVT, dl,
|
||||
LegalizeOp(DAG.getExtLoad(ISD::EXTLOAD, dl, DestVT,
|
||||
DAG.getEntryNode(), CPIdx,
|
||||
MachinePointerInfo::getConstantPool(),
|
||||
MVT::f32, false, false, Alignment));
|
||||
@ -3318,7 +3318,7 @@ void SelectionDAGLegalize::ExpandNode(SDNode *Node,
|
||||
SDValue Addr = DAG.getNode(ISD::ADD, dl, PTy, Index, Table);
|
||||
|
||||
EVT MemVT = EVT::getIntegerVT(*DAG.getContext(), EntrySize * 8);
|
||||
SDValue LD = DAG.getExtLoad(ISD::SEXTLOAD, PTy, dl, Chain, Addr,
|
||||
SDValue LD = DAG.getExtLoad(ISD::SEXTLOAD, dl, PTy, Chain, Addr,
|
||||
MachinePointerInfo::getJumpTable(), MemVT,
|
||||
false, false, 0);
|
||||
Addr = LD;
|
||||
|
@ -1110,7 +1110,7 @@ void DAGTypeLegalizer::ExpandFloatRes_LOAD(SDNode *N, SDValue &Lo,
|
||||
assert(NVT.isByteSized() && "Expanded type not byte sized!");
|
||||
assert(LD->getMemoryVT().bitsLE(NVT) && "Float type not round?");
|
||||
|
||||
Hi = DAG.getExtLoad(LD->getExtensionType(), NVT, dl, Chain, Ptr,
|
||||
Hi = DAG.getExtLoad(LD->getExtensionType(), dl, NVT, Chain, Ptr,
|
||||
LD->getPointerInfo(), LD->getMemoryVT(), LD->isVolatile(),
|
||||
LD->isNonTemporal(), LD->getAlignment());
|
||||
|
||||
|
@ -370,7 +370,7 @@ SDValue DAGTypeLegalizer::PromoteIntRes_LOAD(LoadSDNode *N) {
|
||||
ISD::LoadExtType ExtType =
|
||||
ISD::isNON_EXTLoad(N) ? ISD::EXTLOAD : N->getExtensionType();
|
||||
DebugLoc dl = N->getDebugLoc();
|
||||
SDValue Res = DAG.getExtLoad(ExtType, NVT, dl, N->getChain(), N->getBasePtr(),
|
||||
SDValue Res = DAG.getExtLoad(ExtType, dl, NVT, N->getChain(), N->getBasePtr(),
|
||||
N->getPointerInfo(),
|
||||
N->getMemoryVT(), N->isVolatile(),
|
||||
N->isNonTemporal(), N->getAlignment());
|
||||
@ -1682,7 +1682,7 @@ void DAGTypeLegalizer::ExpandIntRes_LOAD(LoadSDNode *N,
|
||||
if (N->getMemoryVT().bitsLE(NVT)) {
|
||||
EVT MemVT = N->getMemoryVT();
|
||||
|
||||
Lo = DAG.getExtLoad(ExtType, NVT, dl, Ch, Ptr, N->getPointerInfo(),
|
||||
Lo = DAG.getExtLoad(ExtType, dl, NVT, Ch, Ptr, N->getPointerInfo(),
|
||||
MemVT, isVolatile, isNonTemporal, Alignment);
|
||||
|
||||
// Remember the chain.
|
||||
@ -1715,7 +1715,7 @@ void DAGTypeLegalizer::ExpandIntRes_LOAD(LoadSDNode *N,
|
||||
unsigned IncrementSize = NVT.getSizeInBits()/8;
|
||||
Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr,
|
||||
DAG.getIntPtrConstant(IncrementSize));
|
||||
Hi = DAG.getExtLoad(ExtType, NVT, dl, Ch, Ptr,
|
||||
Hi = DAG.getExtLoad(ExtType, dl, NVT, Ch, Ptr,
|
||||
N->getPointerInfo().getWithOffset(IncrementSize), NEVT,
|
||||
isVolatile, isNonTemporal,
|
||||
MinAlign(Alignment, IncrementSize));
|
||||
@ -1733,7 +1733,7 @@ void DAGTypeLegalizer::ExpandIntRes_LOAD(LoadSDNode *N,
|
||||
unsigned ExcessBits = (EBytes - IncrementSize)*8;
|
||||
|
||||
// Load both the high bits and maybe some of the low bits.
|
||||
Hi = DAG.getExtLoad(ExtType, NVT, dl, Ch, Ptr, N->getPointerInfo(),
|
||||
Hi = DAG.getExtLoad(ExtType, dl, NVT, Ch, Ptr, N->getPointerInfo(),
|
||||
EVT::getIntegerVT(*DAG.getContext(),
|
||||
MemVT.getSizeInBits() - ExcessBits),
|
||||
isVolatile, isNonTemporal, Alignment);
|
||||
@ -1742,7 +1742,7 @@ void DAGTypeLegalizer::ExpandIntRes_LOAD(LoadSDNode *N,
|
||||
Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr,
|
||||
DAG.getIntPtrConstant(IncrementSize));
|
||||
// Load the rest of the low bits.
|
||||
Lo = DAG.getExtLoad(ISD::ZEXTLOAD, NVT, dl, Ch, Ptr,
|
||||
Lo = DAG.getExtLoad(ISD::ZEXTLOAD, dl, NVT, Ch, Ptr,
|
||||
N->getPointerInfo().getWithOffset(IncrementSize),
|
||||
EVT::getIntegerVT(*DAG.getContext(), ExcessBits),
|
||||
isVolatile, isNonTemporal,
|
||||
@ -2632,7 +2632,7 @@ SDValue DAGTypeLegalizer::ExpandIntOp_UINT_TO_FP(SDNode *N) {
|
||||
|
||||
// Load the value out, extending it from f32 to the destination float type.
|
||||
// FIXME: Avoid the extend by constructing the right constant pool?
|
||||
SDValue Fudge = DAG.getExtLoad(ISD::EXTLOAD, DstVT, dl, DAG.getEntryNode(),
|
||||
SDValue Fudge = DAG.getExtLoad(ISD::EXTLOAD, dl, DstVT, DAG.getEntryNode(),
|
||||
FudgePtr,
|
||||
MachinePointerInfo::getConstantPool(),
|
||||
MVT::f32,
|
||||
|
@ -1103,7 +1103,7 @@ SDValue DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT(SDNode *N) {
|
||||
|
||||
// Load back the required element.
|
||||
StackPtr = GetVectorElementPointer(StackPtr, EltVT, Idx);
|
||||
return DAG.getExtLoad(ISD::EXTLOAD, N->getValueType(0), dl, Store, StackPtr,
|
||||
return DAG.getExtLoad(ISD::EXTLOAD, dl, N->getValueType(0), Store, StackPtr,
|
||||
MachinePointerInfo(), EltVT, false, false, 0);
|
||||
}
|
||||
|
||||
@ -2387,7 +2387,7 @@ DAGTypeLegalizer::GenWidenVectorExtLoads(SmallVector<SDValue, 16>& LdChain,
|
||||
unsigned WidenNumElts = WidenVT.getVectorNumElements();
|
||||
SmallVector<SDValue, 16> Ops(WidenNumElts);
|
||||
unsigned Increment = LdEltVT.getSizeInBits() / 8;
|
||||
Ops[0] = DAG.getExtLoad(ExtType, EltVT, dl, Chain, BasePtr,
|
||||
Ops[0] = DAG.getExtLoad(ExtType, dl, EltVT, Chain, BasePtr,
|
||||
LD->getPointerInfo(),
|
||||
LdEltVT, isVolatile, isNonTemporal, Align);
|
||||
LdChain.push_back(Ops[0].getValue(1));
|
||||
@ -2395,7 +2395,7 @@ DAGTypeLegalizer::GenWidenVectorExtLoads(SmallVector<SDValue, 16>& LdChain,
|
||||
for (i=1; i < NumElts; ++i, Offset += Increment) {
|
||||
SDValue NewBasePtr = DAG.getNode(ISD::ADD, dl, BasePtr.getValueType(),
|
||||
BasePtr, DAG.getIntPtrConstant(Offset));
|
||||
Ops[i] = DAG.getExtLoad(ExtType, EltVT, dl, Chain, NewBasePtr,
|
||||
Ops[i] = DAG.getExtLoad(ExtType, dl, EltVT, Chain, NewBasePtr,
|
||||
LD->getPointerInfo().getWithOffset(Offset), LdEltVT,
|
||||
isVolatile, isNonTemporal, Align);
|
||||
LdChain.push_back(Ops[i].getValue(1));
|
||||
|
@ -3462,7 +3462,7 @@ static SDValue getMemcpyLoadsAndStores(SelectionDAG &DAG, DebugLoc dl,
|
||||
// FIXME does the case above also need this?
|
||||
EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), VT);
|
||||
assert(NVT.bitsGE(VT));
|
||||
Value = DAG.getExtLoad(ISD::EXTLOAD, NVT, dl, Chain,
|
||||
Value = DAG.getExtLoad(ISD::EXTLOAD, dl, NVT, Chain,
|
||||
getMemBasePlusOffset(Src, SrcOff, DAG),
|
||||
SrcPtrInfo.getWithOffset(SrcOff), VT, isVol, false,
|
||||
MinAlign(SrcAlign, SrcOff));
|
||||
@ -4113,7 +4113,7 @@ SDValue SelectionDAG::getLoad(EVT VT, DebugLoc dl,
|
||||
PtrInfo, VT, isVolatile, isNonTemporal, Alignment, TBAAInfo);
|
||||
}
|
||||
|
||||
SDValue SelectionDAG::getExtLoad(ISD::LoadExtType ExtType, EVT VT, DebugLoc dl,
|
||||
SDValue SelectionDAG::getExtLoad(ISD::LoadExtType ExtType, DebugLoc dl, EVT VT,
|
||||
SDValue Chain, SDValue Ptr,
|
||||
MachinePointerInfo PtrInfo, EVT MemVT,
|
||||
bool isVolatile, bool isNonTemporal,
|
||||
|
@ -542,7 +542,7 @@ void AlphaTargetLowering::LowerVAARG(SDNode *N, SDValue &Chain,
|
||||
false, false, 0);
|
||||
SDValue Tmp = DAG.getNode(ISD::ADD, dl, MVT::i64, VAListP,
|
||||
DAG.getConstant(8, MVT::i64));
|
||||
SDValue Offset = DAG.getExtLoad(ISD::SEXTLOAD, MVT::i64, dl, Base.getValue(1),
|
||||
SDValue Offset = DAG.getExtLoad(ISD::SEXTLOAD, dl, MVT::i64, Base.getValue(1),
|
||||
Tmp, MachinePointerInfo(),
|
||||
MVT::i32, false, false, 0);
|
||||
DataPtr = DAG.getNode(ISD::ADD, dl, MVT::i64, Base, Offset);
|
||||
@ -709,7 +709,7 @@ SDValue AlphaTargetLowering::LowerOperation(SDValue Op,
|
||||
|
||||
SDValue Result;
|
||||
if (Op.getValueType() == MVT::i32)
|
||||
Result = DAG.getExtLoad(ISD::SEXTLOAD, MVT::i64, dl, Chain, DataPtr,
|
||||
Result = DAG.getExtLoad(ISD::SEXTLOAD, dl, MVT::i64, Chain, DataPtr,
|
||||
MachinePointerInfo(), MVT::i32, false, false, 0);
|
||||
else
|
||||
Result = DAG.getLoad(Op.getValueType(), dl, Chain, DataPtr,
|
||||
@ -732,7 +732,7 @@ SDValue AlphaTargetLowering::LowerOperation(SDValue Op,
|
||||
false, false, 0);
|
||||
SDValue NP = DAG.getNode(ISD::ADD, dl, MVT::i64, SrcP,
|
||||
DAG.getConstant(8, MVT::i64));
|
||||
Val = DAG.getExtLoad(ISD::SEXTLOAD, MVT::i64, dl, Result,
|
||||
Val = DAG.getExtLoad(ISD::SEXTLOAD, dl, MVT::i64, Result,
|
||||
NP, MachinePointerInfo(), MVT::i32, false, false, 0);
|
||||
SDValue NPD = DAG.getNode(ISD::ADD, dl, MVT::i64, DestP,
|
||||
DAG.getConstant(8, MVT::i64));
|
||||
|
@ -3050,7 +3050,7 @@ PPCTargetLowering::LowerCall_Darwin(SDValue Chain, SDValue Callee,
|
||||
// Everything else is passed left-justified.
|
||||
EVT VT = (Size==1) ? MVT::i8 : MVT::i16;
|
||||
if (GPR_idx != NumGPRs) {
|
||||
SDValue Load = DAG.getExtLoad(ISD::EXTLOAD, PtrVT, dl, Chain, Arg,
|
||||
SDValue Load = DAG.getExtLoad(ISD::EXTLOAD, dl, PtrVT, Chain, Arg,
|
||||
MachinePointerInfo(), VT,
|
||||
false, false, 0);
|
||||
MemOpChains.push_back(Load.getValue(1));
|
||||
|
@ -274,7 +274,7 @@ SparcTargetLowering::LowerFormalArguments(SDValue Chain,
|
||||
unsigned Offset = 4-std::max(1U, VA.getValVT().getSizeInBits()/8);
|
||||
FIPtr = DAG.getNode(ISD::ADD, dl, MVT::i32, FIPtr,
|
||||
DAG.getConstant(Offset, MVT::i32));
|
||||
Load = DAG.getExtLoad(LoadOp, MVT::i32, dl, Chain, FIPtr,
|
||||
Load = DAG.getExtLoad(LoadOp, dl, MVT::i32, Chain, FIPtr,
|
||||
MachinePointerInfo(),
|
||||
VA.getValVT(), false, false,0);
|
||||
Load = DAG.getNode(ISD::TRUNCATE, dl, VA.getValVT(), Load);
|
||||
|
@ -506,7 +506,7 @@ void X86DAGToDAGISel::PreprocessISelDAG() {
|
||||
N->getOperand(0),
|
||||
MemTmp, MachinePointerInfo(), MemVT,
|
||||
false, false, 0);
|
||||
SDValue Result = CurDAG->getExtLoad(ISD::EXTLOAD, DstVT, dl, Store, MemTmp,
|
||||
SDValue Result = CurDAG->getExtLoad(ISD::EXTLOAD, dl, DstVT, Store, MemTmp,
|
||||
MachinePointerInfo(),
|
||||
MemVT, false, false, 0);
|
||||
|
||||
|
@ -6889,7 +6889,7 @@ SDValue X86TargetLowering::LowerUINT_TO_FP(SDValue Op,
|
||||
|
||||
// Load the value out, extending it from f32 to f80.
|
||||
// FIXME: Avoid the extend by constructing the right constant pool?
|
||||
SDValue Fudge = DAG.getExtLoad(ISD::EXTLOAD, MVT::f80, dl, DAG.getEntryNode(),
|
||||
SDValue Fudge = DAG.getExtLoad(ISD::EXTLOAD, dl, MVT::f80, DAG.getEntryNode(),
|
||||
FudgePtr, MachinePointerInfo::getConstantPool(),
|
||||
MVT::f32, false, false, 4);
|
||||
// Extend everything to 80 bits to force it to be done on x87.
|
||||
|
@ -455,12 +455,12 @@ LowerLOAD(SDValue Op, SelectionDAG &DAG) const {
|
||||
}
|
||||
|
||||
if (LD->getAlignment() == 2) {
|
||||
SDValue Low = DAG.getExtLoad(ISD::ZEXTLOAD, MVT::i32, DL, Chain,
|
||||
SDValue Low = DAG.getExtLoad(ISD::ZEXTLOAD, DL, MVT::i32, Chain,
|
||||
BasePtr, LD->getPointerInfo(), MVT::i16,
|
||||
LD->isVolatile(), LD->isNonTemporal(), 2);
|
||||
SDValue HighAddr = DAG.getNode(ISD::ADD, DL, MVT::i32, BasePtr,
|
||||
DAG.getConstant(2, MVT::i32));
|
||||
SDValue High = DAG.getExtLoad(ISD::EXTLOAD, MVT::i32, DL, Chain,
|
||||
SDValue High = DAG.getExtLoad(ISD::EXTLOAD, DL, MVT::i32, Chain,
|
||||
HighAddr,
|
||||
LD->getPointerInfo().getWithOffset(2),
|
||||
MVT::i16, LD->isVolatile(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user