mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
a few more trivial updates. This fixes PerformInsertVectorEltInMemory to not
pass a completely incorrect SrcValue, which would result in a miscompile with combiner-aa. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114411 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d1c24ed81c
commit
85ca106632
@ -6769,7 +6769,7 @@ SDValue DAGCombiner::SimplifySelectCC(DebugLoc DL, SDValue N0, SDValue N1,
|
|||||||
CPIdx = DAG.getNode(ISD::ADD, DL, TLI.getPointerTy(), CPIdx,
|
CPIdx = DAG.getNode(ISD::ADD, DL, TLI.getPointerTy(), CPIdx,
|
||||||
CstOffset);
|
CstOffset);
|
||||||
return DAG.getLoad(TV->getValueType(0), DL, DAG.getEntryNode(), CPIdx,
|
return DAG.getLoad(TV->getValueType(0), DL, DAG.getEntryNode(), CPIdx,
|
||||||
PseudoSourceValue::getConstantPool(), 0, false,
|
MachinePointerInfo::getConstantPool(), false,
|
||||||
false, Alignment);
|
false, Alignment);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -379,10 +379,10 @@ static SDValue ExpandConstantFP(ConstantFPSDNode *CFP, bool UseCP,
|
|||||||
if (Extend)
|
if (Extend)
|
||||||
return DAG.getExtLoad(ISD::EXTLOAD, OrigVT, dl,
|
return DAG.getExtLoad(ISD::EXTLOAD, OrigVT, dl,
|
||||||
DAG.getEntryNode(),
|
DAG.getEntryNode(),
|
||||||
CPIdx, PseudoSourceValue::getConstantPool(),
|
CPIdx, MachinePointerInfo::getConstantPool(),
|
||||||
0, VT, false, false, Alignment);
|
VT, false, false, Alignment);
|
||||||
return DAG.getLoad(OrigVT, dl, DAG.getEntryNode(), CPIdx,
|
return DAG.getLoad(OrigVT, dl, DAG.getEntryNode(), CPIdx,
|
||||||
PseudoSourceValue::getConstantPool(), 0, false, false,
|
MachinePointerInfo::getConstantPool(), false, false,
|
||||||
Alignment);
|
Alignment);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -660,7 +660,7 @@ PerformInsertVectorEltInMemory(SDValue Vec, SDValue Val, SDValue Idx,
|
|||||||
|
|
||||||
// Store the vector.
|
// Store the vector.
|
||||||
SDValue Ch = DAG.getStore(DAG.getEntryNode(), dl, Tmp1, StackPtr,
|
SDValue Ch = DAG.getStore(DAG.getEntryNode(), dl, Tmp1, StackPtr,
|
||||||
PseudoSourceValue::getFixedStack(SPFI), 0,
|
MachinePointerInfo::getFixedStack(SPFI),
|
||||||
false, false, 0);
|
false, false, 0);
|
||||||
|
|
||||||
// Truncate or zero extend offset to target pointer type.
|
// Truncate or zero extend offset to target pointer type.
|
||||||
@ -671,13 +671,11 @@ PerformInsertVectorEltInMemory(SDValue Vec, SDValue Val, SDValue Idx,
|
|||||||
Tmp3 = DAG.getNode(ISD::MUL, dl, IdxVT, Tmp3,DAG.getConstant(EltSize, IdxVT));
|
Tmp3 = DAG.getNode(ISD::MUL, dl, IdxVT, Tmp3,DAG.getConstant(EltSize, IdxVT));
|
||||||
SDValue StackPtr2 = DAG.getNode(ISD::ADD, dl, IdxVT, Tmp3, StackPtr);
|
SDValue StackPtr2 = DAG.getNode(ISD::ADD, dl, IdxVT, Tmp3, StackPtr);
|
||||||
// Store the scalar value.
|
// Store the scalar value.
|
||||||
Ch = DAG.getTruncStore(Ch, dl, Tmp2, StackPtr2,
|
Ch = DAG.getTruncStore(Ch, dl, Tmp2, StackPtr2, MachinePointerInfo(), EltVT,
|
||||||
PseudoSourceValue::getFixedStack(SPFI), 0, EltVT,
|
|
||||||
false, false, 0);
|
false, false, 0);
|
||||||
// Load the updated vector.
|
// Load the updated vector.
|
||||||
return DAG.getLoad(VT, dl, Ch, StackPtr,
|
return DAG.getLoad(VT, dl, Ch, StackPtr,
|
||||||
PseudoSourceValue::getFixedStack(SPFI), 0,
|
MachinePointerInfo::getFixedStack(SPFI), false, false, 0);
|
||||||
false, false, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1810,11 +1808,11 @@ SDValue SelectionDAGLegalize::ExpandSCALAR_TO_VECTOR(SDNode *Node) {
|
|||||||
|
|
||||||
SDValue Ch = DAG.getTruncStore(DAG.getEntryNode(), dl, Node->getOperand(0),
|
SDValue Ch = DAG.getTruncStore(DAG.getEntryNode(), dl, Node->getOperand(0),
|
||||||
StackPtr,
|
StackPtr,
|
||||||
PseudoSourceValue::getFixedStack(SPFI), 0,
|
MachinePointerInfo::getFixedStack(SPFI),
|
||||||
Node->getValueType(0).getVectorElementType(),
|
Node->getValueType(0).getVectorElementType(),
|
||||||
false, false, 0);
|
false, false, 0);
|
||||||
return DAG.getLoad(Node->getValueType(0), dl, Ch, StackPtr,
|
return DAG.getLoad(Node->getValueType(0), dl, Ch, StackPtr,
|
||||||
PseudoSourceValue::getFixedStack(SPFI), 0,
|
MachinePointerInfo::getFixedStack(SPFI),
|
||||||
false, false, 0);
|
false, false, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1888,7 +1886,7 @@ SDValue SelectionDAGLegalize::ExpandBUILD_VECTOR(SDNode *Node) {
|
|||||||
SDValue CPIdx = DAG.getConstantPool(CP, TLI.getPointerTy());
|
SDValue CPIdx = DAG.getConstantPool(CP, TLI.getPointerTy());
|
||||||
unsigned Alignment = cast<ConstantPoolSDNode>(CPIdx)->getAlignment();
|
unsigned Alignment = cast<ConstantPoolSDNode>(CPIdx)->getAlignment();
|
||||||
return DAG.getLoad(VT, dl, DAG.getEntryNode(), CPIdx,
|
return DAG.getLoad(VT, dl, DAG.getEntryNode(), CPIdx,
|
||||||
PseudoSourceValue::getConstantPool(), 0,
|
MachinePointerInfo::getConstantPool(),
|
||||||
false, false, Alignment);
|
false, false, Alignment);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2189,13 +2187,13 @@ SDValue SelectionDAGLegalize::ExpandLegalINT_TO_FP(bool isSigned,
|
|||||||
SDValue FudgeInReg;
|
SDValue FudgeInReg;
|
||||||
if (DestVT == MVT::f32)
|
if (DestVT == MVT::f32)
|
||||||
FudgeInReg = DAG.getLoad(MVT::f32, dl, DAG.getEntryNode(), CPIdx,
|
FudgeInReg = DAG.getLoad(MVT::f32, dl, DAG.getEntryNode(), CPIdx,
|
||||||
PseudoSourceValue::getConstantPool(), 0,
|
MachinePointerInfo::getConstantPool(),
|
||||||
false, false, Alignment);
|
false, false, Alignment);
|
||||||
else {
|
else {
|
||||||
FudgeInReg =
|
FudgeInReg =
|
||||||
LegalizeOp(DAG.getExtLoad(ISD::EXTLOAD, DestVT, dl,
|
LegalizeOp(DAG.getExtLoad(ISD::EXTLOAD, DestVT, dl,
|
||||||
DAG.getEntryNode(), CPIdx,
|
DAG.getEntryNode(), CPIdx,
|
||||||
PseudoSourceValue::getConstantPool(), 0,
|
MachinePointerInfo::getConstantPool(),
|
||||||
MVT::f32, false, false, Alignment));
|
MVT::f32, false, false, Alignment));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3166,7 +3164,7 @@ void SelectionDAGLegalize::ExpandNode(SDNode *Node,
|
|||||||
|
|
||||||
EVT MemVT = EVT::getIntegerVT(*DAG.getContext(), EntrySize * 8);
|
EVT MemVT = EVT::getIntegerVT(*DAG.getContext(), EntrySize * 8);
|
||||||
SDValue LD = DAG.getExtLoad(ISD::SEXTLOAD, PTy, dl, Chain, Addr,
|
SDValue LD = DAG.getExtLoad(ISD::SEXTLOAD, PTy, dl, Chain, Addr,
|
||||||
PseudoSourceValue::getJumpTable(), 0, MemVT,
|
MachinePointerInfo::getJumpTable(), MemVT,
|
||||||
false, false, 0);
|
false, false, 0);
|
||||||
Addr = LD;
|
Addr = LD;
|
||||||
if (TM.getRelocationModel() == Reloc::PIC_) {
|
if (TM.getRelocationModel() == Reloc::PIC_) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user