Lines Matching refs:Len
142 uint64_t Len = GetStringLength(CI->getArgOperand(SizeArgOp));
145 if (Len == 0) return false;
146 return SizeCI->getZExtValue() >= Len;
255 uint64_t Len = GetStringLength(Src);
256 if (Len == 0) return 0;
263 ConstantInt::get(TD->getIntPtrType(Context), Len),
302 uint64_t Len = GetStringLength(Src);
303 if (Len == 0) return 0;
309 Value *LenV = ConstantInt::get(TD->getIntPtrType(PT), Len);
312 Len - 1));
365 uint64_t Len = GetStringLength(Src);
366 if (Len == 0) return 0;
367 --Len; // Unbias length.
370 if (Len == 0)
376 return emitStrLenMemCpy(Src, Dst, Len, B);
379 Value *emitStrLenMemCpy(Value *Src, Value *Dst, uint64_t Len,
395 ConstantInt::get(TD->getIntPtrType(*Context), Len + 1), 1);
414 uint64_t Len;
418 Len = LengthArg->getZExtValue();
430 if (SrcLen == 0 || Len == 0) return Dst;
436 if (Len < SrcLen) return 0;
463 uint64_t Len = GetStringLength(SrcStr);
464 if (Len == 0 || !FT->getParamType(1)->isIntegerTy(32))// memchr needs i32.
468 ConstantInt::get(TD->getIntPtrType(*Context), Len),
639 uint64_t Len = GetStringLength(Src);
640 if (Len == 0) return 0;
645 ConstantInt::get(TD->getIntPtrType(*Context), Len), 1);
670 uint64_t Len = GetStringLength(Src);
671 if (Len == 0) return 0;
674 Value *LenV = ConstantInt::get(TD->getIntPtrType(PT), Len);
677 Len - 1));
710 uint64_t Len;
712 Len = LengthArg->getZExtValue();
716 if (Len == 0) return Dst; // strncpy(x, y, 0) -> x
722 if (Len > SrcLen+1) return 0;
727 ConstantInt::get(TD->getIntPtrType(PT), Len), 1);
745 if (uint64_t Len = GetStringLength(Src))
746 return ConstantInt::get(CI->getType(), Len-1);
951 uint64_t Len = LenC->getZExtValue();
953 if (Len == 0) // memcmp(s1,s2,0) -> 0
957 if (Len == 1) {
970 if (Len > LHSStr.size() || Len > RHSStr.size())
975 int Cmp = memcmp(LHSStr.data(), RHSStr.data(), Len);
1472 Value *Len = EmitStrLen(CI->getArgOperand(2), B, TD, TLI);
1473 if (!Len)
1475 Value *IncLen = B.CreateAdd(Len,
1476 ConstantInt::get(Len->getType(), 1),
1481 return B.CreateIntCast(Len, CI->getType(), false);
1637 uint64_t Len = GetStringLength(CI->getArgOperand(0));
1638 if (!Len) return 0;
1641 ConstantInt::get(TD->getIntPtrType(*Context), Len-1),