SetSplitVector(SDValue(N, ResNo), Lo, Hi);
}
+void DAGTypeLegalizer::IncrementPointer(MemSDNode *N, EVT MemVT,
+ MachinePointerInfo &MPI,
+ SDValue &Ptr) {
+ SDLoc DL(N);
+ unsigned IncrementSize = MemVT.getSizeInBits().getKnownMinSize() / 8;
+
+ if (MemVT.isScalableVector()) {
+ SDValue BytesIncrement = DAG.getVScale(
+ DL, Ptr.getValueType(),
+ APInt(Ptr.getValueSizeInBits().getFixedSize(), IncrementSize));
+ MPI = MachinePointerInfo(N->getPointerInfo().getAddrSpace());
+ Ptr = DAG.getNode(ISD::ADD, DL, Ptr.getValueType(), Ptr, BytesIncrement);
+ } else {
+ MPI = N->getPointerInfo().getWithOffset(IncrementSize);
+ // Increment the pointer to the other half.
+ Ptr = DAG.getObjectPtrOffset(DL, Ptr, IncrementSize);
+ }
+}
+
void DAGTypeLegalizer::SplitVecRes_BinOp(SDNode *N, SDValue &Lo,
SDValue &Hi) {
SDValue LHSLo, LHSHi;
LD->getPointerInfo(), LoMemVT, LD->getOriginalAlign(),
MMOFlags, AAInfo);
- unsigned IncrementSize = LoMemVT.getSizeInBits().getKnownMinSize() / 8;
-
MachinePointerInfo MPI;
- if (LoVT.isScalableVector()) {
- SDValue BytesIncrement = DAG.getVScale(
- dl, Ptr.getValueType(),
- APInt(Ptr.getValueSizeInBits().getFixedSize(), IncrementSize));
- MPI = MachinePointerInfo(LD->getPointerInfo().getAddrSpace());
- Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr, BytesIncrement);
- } else {
- MPI = LD->getPointerInfo().getWithOffset(IncrementSize);
- Ptr = DAG.getObjectPtrOffset(dl, Ptr, IncrementSize);
- }
+ IncrementPointer(LD, LoMemVT, MPI, Ptr);
Hi = DAG.getLoad(ISD::UNINDEXED, ExtType, HiVT, dl, Ch, Ptr, Offset, MPI,
HiMemVT, LD->getOriginalAlign(), MMOFlags, AAInfo);
if (!LoMemVT.isByteSized() || !HiMemVT.isByteSized())
return TLI.scalarizeVectorStore(N, DAG);
- unsigned IncrementSize = LoMemVT.getSizeInBits().getKnownMinSize() / 8;
-
if (isTruncating)
Lo = DAG.getTruncStore(Ch, DL, Lo, Ptr, N->getPointerInfo(), LoMemVT,
Alignment, MMOFlags, AAInfo);
AAInfo);
MachinePointerInfo MPI;
- if (LoMemVT.isScalableVector()) {
- SDValue BytesIncrement = DAG.getVScale(
- DL, Ptr.getValueType(),
- APInt(Ptr.getValueSizeInBits().getFixedSize(), IncrementSize));
- MPI = MachinePointerInfo(N->getPointerInfo().getAddrSpace());
- Ptr = DAG.getNode(ISD::ADD, DL, Ptr.getValueType(), Ptr, BytesIncrement);
- } else {
- MPI = N->getPointerInfo().getWithOffset(IncrementSize);
- // Increment the pointer to the other half.
- Ptr = DAG.getObjectPtrOffset(DL, Ptr, IncrementSize);
- }
+ IncrementPointer(N, LoMemVT, MPI, Ptr);
if (isTruncating)
Hi = DAG.getTruncStore(Ch, DL, Hi, Ptr, MPI,