Lines Matching refs:DAG

25 static SDValue emitMemMem(SelectionDAG &DAG, const SDLoc &DL, unsigned Sequence,
41 return DAG.getNode(Loop, DL, MVT::Other, Chain, Dst, Src,
42 DAG.getConstant(Size, DL, PtrVT),
43 DAG.getConstant(Size / 256, DL, PtrVT));
44 return DAG.getNode(Sequence, DL, MVT::Other, Chain, Dst, Src,
45 DAG.getConstant(Size, DL, PtrVT));
49 SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Dst, SDValue Src,
56 return emitMemMem(DAG, DL, SystemZISD::MVC, SystemZISD::MVC_LOOP,
64 static SDValue memsetStore(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain,
70 return DAG.getStore(
71 Chain, DL, DAG.getConstant(StoreVal, DL, MVT::getIntegerVT(Size * 8)),
76 SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Dst,
99 SDValue Chain1 = memsetStore(DAG, DL, Chain, Dst, ByteVal, Size1,
103 Dst = DAG.getNode(ISD::ADD, DL, PtrVT, Dst,
104 DAG.getConstant(Size1, DL, PtrVT));
106 SDValue Chain2 = memsetStore(DAG, DL, Chain, Dst, ByteVal, Size2,
108 return DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Chain1, Chain2);
113 SDValue Chain1 = DAG.getStore(Chain, DL, Byte, Dst, DstPtrInfo, Align);
116 SDValue Dst2 = DAG.getNode(ISD::ADD, DL, PtrVT, Dst,
117 DAG.getConstant(1, DL, PtrVT));
119 DAG.getStore(Chain, DL, Byte, Dst2, DstPtrInfo.getWithOffset(1),
121 return DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Chain1, Chain2);
129 return emitMemMem(DAG, DL, SystemZISD::XC, SystemZISD::XC_LOOP,
134 Chain = DAG.getStore(Chain, DL, Byte, Dst, DstPtrInfo, Align);
135 SDValue DstPlus1 = DAG.getNode(ISD::ADD, DL, PtrVT, Dst,
136 DAG.getConstant(1, DL, PtrVT));
137 return emitMemMem(DAG, DL, SystemZISD::MVC, SystemZISD::MVC_LOOP,
145 static SDValue emitCLC(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain,
147 SDVTList VTs = DAG.getVTList(MVT::i32, MVT::Other);
158 return DAG.getNode(SystemZISD::CLC_LOOP, DL, VTs, Chain, Src1, Src2,
159 DAG.getConstant(Size, DL, PtrVT),
160 DAG.getConstant(Size / 256, DL, PtrVT));
161 return DAG.getNode(SystemZISD::CLC, DL, VTs, Chain, Src1, Src2,
162 DAG.getConstant(Size, DL, PtrVT));
170 SelectionDAG &DAG) {
171 SDValue IPM = DAG.getNode(SystemZISD::IPM, DL, MVT::i32, CCReg);
172 SDValue SHL = DAG.getNode(ISD::SHL, DL, MVT::i32, IPM,
173 DAG.getConstant(30 - SystemZ::IPM_CC, DL, MVT::i32));
174 SDValue SRA = DAG.getNode(ISD::SRA, DL, MVT::i32, SHL,
175 DAG.getConstant(30, DL, MVT::i32));
180 SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Src1,
187 SDValue CCReg = emitCLC(DAG, DL, Chain, Src2, Src1, Bytes);
189 return std::make_pair(addIPMSequence(DL, CCReg, DAG), Chain);
195 SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Src,
199 SDVTList VTs = DAG.getVTList(PtrVT, MVT::i32, MVT::Other);
200 Length = DAG.getZExtOrTrunc(Length, DL, PtrVT);
201 Char = DAG.getZExtOrTrunc(Char, DL, MVT::i32);
202 Char = DAG.getNode(ISD::AND, DL, MVT::i32, Char,
203 DAG.getConstant(255, DL, MVT::i32));
204 SDValue Limit = DAG.getNode(ISD::ADD, DL, PtrVT, Src, Length);
205 SDValue End = DAG.getNode(SystemZISD::SEARCH_STRING, DL, VTs, Chain,
213 End, DAG.getConstant(0, DL, PtrVT),
214 DAG.getTargetConstant(SystemZ::CCMASK_SRST, DL, MVT::i32),
215 DAG.getTargetConstant(SystemZ::CCMASK_SRST_FOUND, DL, MVT::i32), CCReg};
216 End = DAG.getNode(SystemZISD::SELECT_CCMASK, DL, PtrVT, Ops);
221 SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Dest,
224 SDVTList VTs = DAG.getVTList(Dest.getValueType(), MVT::Other);
225 SDValue EndDest = DAG.getNode(SystemZISD::STPCPY, DL, VTs, Chain, Dest, Src,
226 DAG.getConstant(0, DL, MVT::i32));
231 SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Src1,
234 SDVTList VTs = DAG.getVTList(Src1.getValueType(), MVT::i32, MVT::Other);
236 SDValue Unused = DAG.getNode(SystemZISD::STRCMP, DL, VTs, Chain, Src2, Src1,
237 DAG.getConstant(0, DL, MVT::i32));
240 return std::make_pair(addIPMSequence(DL, CCReg, DAG), Chain);
248 static std::pair<SDValue, SDValue> getBoundedStrlen(SelectionDAG &DAG,
253 SDVTList VTs = DAG.getVTList(PtrVT, MVT::i32, MVT::Other);
254 SDValue End = DAG.getNode(SystemZISD::SEARCH_STRING, DL, VTs, Chain,
255 Limit, Src, DAG.getConstant(0, DL, MVT::i32));
257 SDValue Len = DAG.getNode(ISD::SUB, DL, PtrVT, End, Src);
262 SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Src,
265 return getBoundedStrlen(DAG, DL, Chain, Src, DAG.getConstant(0, DL, PtrVT));
269 SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Src,
272 MaxLength = DAG.getZExtOrTrunc(MaxLength, DL, PtrVT);
273 SDValue Limit = DAG.getNode(ISD::ADD, DL, PtrVT, Src, MaxLength);
274 return getBoundedStrlen(DAG, DL, Chain, Src, Limit);