• Home
  • Raw
  • Download

Lines Matching refs:DAG

26 static SDValue emitMemMem(SelectionDAG &DAG, SDLoc DL, unsigned Sequence,  in emitMemMem()  argument
42 return DAG.getNode(Loop, DL, MVT::Other, Chain, Dst, Src, in emitMemMem()
43 DAG.getConstant(Size, DL, PtrVT), in emitMemMem()
44 DAG.getConstant(Size / 256, DL, PtrVT)); in emitMemMem()
45 return DAG.getNode(Sequence, DL, MVT::Other, Chain, Dst, Src, in emitMemMem()
46 DAG.getConstant(Size, DL, PtrVT)); in emitMemMem()
50 EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc DL, SDValue Chain, in EmitTargetCodeForMemcpy() argument
59 return emitMemMem(DAG, DL, SystemZISD::MVC, SystemZISD::MVC_LOOP, in EmitTargetCodeForMemcpy()
67 static SDValue memsetStore(SelectionDAG &DAG, SDLoc DL, SDValue Chain, in memsetStore() argument
74 return DAG.getStore(Chain, DL, in memsetStore()
75 DAG.getConstant(StoreVal, DL, in memsetStore()
81 EmitTargetCodeForMemset(SelectionDAG &DAG, SDLoc DL, SDValue Chain, in EmitTargetCodeForMemset() argument
105 SDValue Chain1 = memsetStore(DAG, DL, Chain, Dst, ByteVal, Size1, in EmitTargetCodeForMemset()
109 Dst = DAG.getNode(ISD::ADD, DL, PtrVT, Dst, in EmitTargetCodeForMemset()
110 DAG.getConstant(Size1, DL, PtrVT)); in EmitTargetCodeForMemset()
112 SDValue Chain2 = memsetStore(DAG, DL, Chain, Dst, ByteVal, Size2, in EmitTargetCodeForMemset()
114 return DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Chain1, Chain2); in EmitTargetCodeForMemset()
119 SDValue Chain1 = DAG.getStore(Chain, DL, Byte, Dst, DstPtrInfo, in EmitTargetCodeForMemset()
123 SDValue Dst2 = DAG.getNode(ISD::ADD, DL, PtrVT, Dst, in EmitTargetCodeForMemset()
124 DAG.getConstant(1, DL, PtrVT)); in EmitTargetCodeForMemset()
125 SDValue Chain2 = DAG.getStore(Chain, DL, Byte, Dst2, in EmitTargetCodeForMemset()
128 return DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Chain1, Chain2); in EmitTargetCodeForMemset()
136 return emitMemMem(DAG, DL, SystemZISD::XC, SystemZISD::XC_LOOP, in EmitTargetCodeForMemset()
141 Chain = DAG.getStore(Chain, DL, Byte, Dst, DstPtrInfo, in EmitTargetCodeForMemset()
143 SDValue DstPlus1 = DAG.getNode(ISD::ADD, DL, PtrVT, Dst, in EmitTargetCodeForMemset()
144 DAG.getConstant(1, DL, PtrVT)); in EmitTargetCodeForMemset()
145 return emitMemMem(DAG, DL, SystemZISD::MVC, SystemZISD::MVC_LOOP, in EmitTargetCodeForMemset()
153 static SDValue emitCLC(SelectionDAG &DAG, SDLoc DL, SDValue Chain, in emitCLC() argument
155 SDVTList VTs = DAG.getVTList(MVT::Other, MVT::Glue); in emitCLC()
166 return DAG.getNode(SystemZISD::CLC_LOOP, DL, VTs, Chain, Src1, Src2, in emitCLC()
167 DAG.getConstant(Size, DL, PtrVT), in emitCLC()
168 DAG.getConstant(Size / 256, DL, PtrVT)); in emitCLC()
169 return DAG.getNode(SystemZISD::CLC, DL, VTs, Chain, Src1, Src2, in emitCLC()
170 DAG.getConstant(Size, DL, PtrVT)); in emitCLC()
177 static SDValue addIPMSequence(SDLoc DL, SDValue Glue, SelectionDAG &DAG) { in addIPMSequence() argument
178 SDValue IPM = DAG.getNode(SystemZISD::IPM, DL, MVT::i32, Glue); in addIPMSequence()
179 SDValue SRL = DAG.getNode(ISD::SRL, DL, MVT::i32, IPM, in addIPMSequence()
180 DAG.getConstant(SystemZ::IPM_CC, DL, MVT::i32)); in addIPMSequence()
181 SDValue ROTL = DAG.getNode(ISD::ROTL, DL, MVT::i32, SRL, in addIPMSequence()
182 DAG.getConstant(31, DL, MVT::i32)); in addIPMSequence()
187 EmitTargetCodeForMemcmp(SelectionDAG &DAG, SDLoc DL, SDValue Chain, in EmitTargetCodeForMemcmp() argument
194 Chain = emitCLC(DAG, DL, Chain, Src1, Src2, Bytes); in EmitTargetCodeForMemcmp()
196 return std::make_pair(addIPMSequence(DL, Glue, DAG), Chain); in EmitTargetCodeForMemcmp()
202 EmitTargetCodeForMemchr(SelectionDAG &DAG, SDLoc DL, SDValue Chain, in EmitTargetCodeForMemchr() argument
207 SDVTList VTs = DAG.getVTList(PtrVT, MVT::Other, MVT::Glue); in EmitTargetCodeForMemchr()
208 Length = DAG.getZExtOrTrunc(Length, DL, PtrVT); in EmitTargetCodeForMemchr()
209 Char = DAG.getZExtOrTrunc(Char, DL, MVT::i32); in EmitTargetCodeForMemchr()
210 Char = DAG.getNode(ISD::AND, DL, MVT::i32, Char, in EmitTargetCodeForMemchr()
211 DAG.getConstant(255, DL, MVT::i32)); in EmitTargetCodeForMemchr()
212 SDValue Limit = DAG.getNode(ISD::ADD, DL, PtrVT, Src, Length); in EmitTargetCodeForMemchr()
213 SDValue End = DAG.getNode(SystemZISD::SEARCH_STRING, DL, VTs, Chain, in EmitTargetCodeForMemchr()
220 SDValue Ops[] = {End, DAG.getConstant(0, DL, PtrVT), in EmitTargetCodeForMemchr()
221 DAG.getConstant(SystemZ::CCMASK_SRST, DL, MVT::i32), in EmitTargetCodeForMemchr()
222 DAG.getConstant(SystemZ::CCMASK_SRST_FOUND, DL, MVT::i32), in EmitTargetCodeForMemchr()
224 VTs = DAG.getVTList(PtrVT, MVT::Glue); in EmitTargetCodeForMemchr()
225 End = DAG.getNode(SystemZISD::SELECT_CCMASK, DL, VTs, Ops); in EmitTargetCodeForMemchr()
230 EmitTargetCodeForStrcpy(SelectionDAG &DAG, SDLoc DL, SDValue Chain, in EmitTargetCodeForStrcpy() argument
234 SDVTList VTs = DAG.getVTList(Dest.getValueType(), MVT::Other); in EmitTargetCodeForStrcpy()
235 SDValue EndDest = DAG.getNode(SystemZISD::STPCPY, DL, VTs, Chain, Dest, Src, in EmitTargetCodeForStrcpy()
236 DAG.getConstant(0, DL, MVT::i32)); in EmitTargetCodeForStrcpy()
241 EmitTargetCodeForStrcmp(SelectionDAG &DAG, SDLoc DL, SDValue Chain, in EmitTargetCodeForStrcmp() argument
245 SDVTList VTs = DAG.getVTList(Src1.getValueType(), MVT::Other, MVT::Glue); in EmitTargetCodeForStrcmp()
246 SDValue Unused = DAG.getNode(SystemZISD::STRCMP, DL, VTs, Chain, Src1, Src2, in EmitTargetCodeForStrcmp()
247 DAG.getConstant(0, DL, MVT::i32)); in EmitTargetCodeForStrcmp()
250 return std::make_pair(addIPMSequence(DL, Glue, DAG), Chain); in EmitTargetCodeForStrcmp()
258 static std::pair<SDValue, SDValue> getBoundedStrlen(SelectionDAG &DAG, SDLoc DL, in getBoundedStrlen() argument
262 SDVTList VTs = DAG.getVTList(PtrVT, MVT::Other, MVT::Glue); in getBoundedStrlen()
263 SDValue End = DAG.getNode(SystemZISD::SEARCH_STRING, DL, VTs, Chain, in getBoundedStrlen()
264 Limit, Src, DAG.getConstant(0, DL, MVT::i32)); in getBoundedStrlen()
266 SDValue Len = DAG.getNode(ISD::SUB, DL, PtrVT, End, Src); in getBoundedStrlen()
271 EmitTargetCodeForStrlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain, in EmitTargetCodeForStrlen() argument
274 return getBoundedStrlen(DAG, DL, Chain, Src, DAG.getConstant(0, DL, PtrVT)); in EmitTargetCodeForStrlen()
278 EmitTargetCodeForStrnlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain, in EmitTargetCodeForStrnlen() argument
282 MaxLength = DAG.getZExtOrTrunc(MaxLength, DL, PtrVT); in EmitTargetCodeForStrnlen()
283 SDValue Limit = DAG.getNode(ISD::ADD, DL, PtrVT, Src, MaxLength); in EmitTargetCodeForStrnlen()
284 return getBoundedStrlen(DAG, DL, Chain, Src, Limit); in EmitTargetCodeForStrnlen()