Lines Matching refs:getArgOperand
112 Value *Dst = CI->getArgOperand(0); in optimizeStrCat()
113 Value *Src = CI->getArgOperand(1); in optimizeStrCat()
151 Value *Dst = CI->getArgOperand(0); in optimizeStrNCat()
152 Value *Src = CI->getArgOperand(1); in optimizeStrNCat()
156 if (ConstantInt *LengthArg = dyn_cast<ConstantInt>(CI->getArgOperand(2))) in optimizeStrNCat()
185 Value *SrcStr = CI->getArgOperand(0); in optimizeStrChr()
189 ConstantInt *CharC = dyn_cast<ConstantInt>(CI->getArgOperand(1)); in optimizeStrChr()
195 return emitMemChr(SrcStr, CI->getArgOperand(1), // include nul. in optimizeStrChr()
223 Value *SrcStr = CI->getArgOperand(0); in optimizeStrRChr()
224 ConstantInt *CharC = dyn_cast<ConstantInt>(CI->getArgOperand(1)); in optimizeStrRChr()
250 Value *Str1P = CI->getArgOperand(0), *Str2P = CI->getArgOperand(1); in optimizeStrCmp()
283 Value *Str1P = CI->getArgOperand(0), *Str2P = CI->getArgOperand(1); in optimizeStrNCmp()
289 if (ConstantInt *LengthArg = dyn_cast<ConstantInt>(CI->getArgOperand(2))) in optimizeStrNCmp()
298 return emitMemCmp(Str1P, Str2P, CI->getArgOperand(2), B, DL, TLI); in optimizeStrNCmp()
322 Value *Dst = CI->getArgOperand(0), *Src = CI->getArgOperand(1); in optimizeStrCpy()
340 Value *Dst = CI->getArgOperand(0), *Src = CI->getArgOperand(1); in optimizeStpCpy()
364 Value *Dst = CI->getArgOperand(0); in optimizeStrNCpy()
365 Value *Src = CI->getArgOperand(1); in optimizeStrNCpy()
366 Value *LenOp = CI->getArgOperand(2); in optimizeStrNCpy()
401 Value *Src = CI->getArgOperand(0); in optimizeStrLen()
483 bool HasS1 = getConstantStringInfo(CI->getArgOperand(0), S1); in optimizeStrPBrk()
484 bool HasS2 = getConstantStringInfo(CI->getArgOperand(1), S2); in optimizeStrPBrk()
497 return B.CreateGEP(B.getInt8Ty(), CI->getArgOperand(0), B.getInt64(I), in optimizeStrPBrk()
503 return emitStrChr(CI->getArgOperand(0), S2[0], B, TLI); in optimizeStrPBrk()
509 Value *EndPtr = CI->getArgOperand(1); in optimizeStrTo()
521 bool HasS1 = getConstantStringInfo(CI->getArgOperand(0), S1); in optimizeStrSpn()
522 bool HasS2 = getConstantStringInfo(CI->getArgOperand(1), S2); in optimizeStrSpn()
542 bool HasS1 = getConstantStringInfo(CI->getArgOperand(0), S1); in optimizeStrCSpn()
543 bool HasS2 = getConstantStringInfo(CI->getArgOperand(1), S2); in optimizeStrCSpn()
559 return emitStrLen(CI->getArgOperand(0), B, DL, TLI); in optimizeStrCSpn()
566 if (CI->getArgOperand(0) == CI->getArgOperand(1)) in optimizeStrStr()
567 return B.CreateBitCast(CI->getArgOperand(0), CI->getType()); in optimizeStrStr()
570 if (isOnlyUsedInEqualityComparison(CI, CI->getArgOperand(0))) { in optimizeStrStr()
571 Value *StrLen = emitStrLen(CI->getArgOperand(1), B, DL, TLI); in optimizeStrStr()
574 Value *StrNCmp = emitStrNCmp(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeStrStr()
590 bool HasStr1 = getConstantStringInfo(CI->getArgOperand(0), SearchStr); in optimizeStrStr()
591 bool HasStr2 = getConstantStringInfo(CI->getArgOperand(1), ToFindStr); in optimizeStrStr()
595 return B.CreateBitCast(CI->getArgOperand(0), CI->getType()); in optimizeStrStr()
605 Value *Result = castToCStr(CI->getArgOperand(0), B); in optimizeStrStr()
612 Value *StrChr = emitStrChr(CI->getArgOperand(0), ToFindStr[0], B, TLI); in optimizeStrStr()
619 Value *SrcStr = CI->getArgOperand(0); in optimizeMemChr()
620 ConstantInt *CharC = dyn_cast<ConstantInt>(CI->getArgOperand(1)); in optimizeMemChr()
621 ConstantInt *LenC = dyn_cast<ConstantInt>(CI->getArgOperand(2)); in optimizeMemChr()
670 Value *C = B.CreateZExtOrTrunc(CI->getArgOperand(1), BitfieldC->getType()); in optimizeMemChr()
697 Value *LHS = CI->getArgOperand(0), *RHS = CI->getArgOperand(1); in optimizeMemCmp()
703 ConstantInt *LenC = dyn_cast<ConstantInt>(CI->getArgOperand(2)); in optimizeMemCmp()
766 B.CreateMemCpy(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeMemCpy()
767 CI->getArgOperand(2), 1); in optimizeMemCpy()
768 return CI->getArgOperand(0); in optimizeMemCpy()
773 B.CreateMemMove(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeMemMove()
774 CI->getArgOperand(2), 1); in optimizeMemMove()
775 return CI->getArgOperand(0); in optimizeMemMove()
803 auto *FillValue = dyn_cast<ConstantInt>(Memset->getArgOperand(1)); in foldMallocMemset()
811 auto *Malloc = dyn_cast<CallInst>(Memset->getArgOperand(0)); in foldMallocMemset()
823 if (Memset->getArgOperand(2) != Malloc->getArgOperand(0)) in foldMallocMemset()
832 Malloc->getArgOperand(0), Malloc->getAttributes(), in foldMallocMemset()
848 Value *Val = B.CreateIntCast(CI->getArgOperand(1), B.getInt8Ty(), false); in optimizeMemSet()
849 B.CreateMemSet(CI->getArgOperand(0), Val, CI->getArgOperand(2), 1); in optimizeMemSet()
850 return CI->getArgOperand(0); in optimizeMemSet()
897 Value *V = valueHasFloatPrecision(CI->getArgOperand(0)); in optimizeUnaryDoubleFP()
928 Value *V1 = valueHasFloatPrecision(CI->getArgOperand(0)); in optimizeBinaryDoubleFP()
931 Value *V2 = valueHasFloatPrecision(CI->getArgOperand(1)); in optimizeBinaryDoubleFP()
955 Value *Op1 = CI->getArgOperand(0); in optimizeCos()
995 Value *Op1 = CI->getArgOperand(0), *Op2 = CI->getArgOperand(1); in optimizePow()
1028 Value *FMul = B.CreateFMul(OpC->getArgOperand(0), Op2, "mul"); in optimizePow()
1113 Value *Op = CI->getArgOperand(0); in optimizeExp2()
1158 Value *Op = CI->getArgOperand(0); in optimizeFabs()
1198 Value *Op0 = CI->getArgOperand(0); in optimizeFMinFMax()
1199 Value *Op1 = CI->getArgOperand(1); in optimizeFMinFMax()
1214 Value *Op1 = CI->getArgOperand(0); in optimizeLog()
1235 return B.CreateFMul(OpC->getArgOperand(1), in optimizeLog()
1243 OpC->getArgOperand(0), in optimizeLog()
1260 Instruction *I = dyn_cast<Instruction>(CI->getArgOperand(0)); in optimizeSqrt()
1324 Value *Op1 = CI->getArgOperand(0); in optimizeTan()
1342 Ret = OpC->getArgOperand(0); in optimizeTan()
1410 Value *Arg = CI->getArgOperand(0); in optimizeSinCosPi()
1487 Value *Op = CI->getArgOperand(0); in optimizeFFS()
1511 Value *Op = CI->getArgOperand(0); in optimizeAbs()
1520 Value *Op = CI->getArgOperand(0); in optimizeIsDigit()
1528 Value *Op = CI->getArgOperand(0); in optimizeIsAscii()
1535 return B.CreateAnd(CI->getArgOperand(0), in optimizeToAscii()
1576 LoadInst *LI = dyn_cast<LoadInst>(CI->getArgOperand(StreamArg)); in isReportingError()
1588 if (!getConstantStringInfo(CI->getArgOperand(0), FormatStr)) in optimizePrintFString()
1628 CI->getArgOperand(1)->getType()->isIntegerTy()) in optimizePrintFString()
1629 return emitPutChar(CI->getArgOperand(1), B, TLI); in optimizePrintFString()
1633 CI->getArgOperand(1)->getType()->isPointerTy()) in optimizePrintFString()
1634 return emitPutS(CI->getArgOperand(1), B, TLI); in optimizePrintFString()
1663 if (!getConstantStringInfo(CI->getArgOperand(1), FormatStr)) in optimizeSPrintFString()
1675 B.CreateMemCpy(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeSPrintFString()
1691 if (!CI->getArgOperand(2)->getType()->isIntegerTy()) in optimizeSPrintFString()
1693 Value *V = B.CreateTrunc(CI->getArgOperand(2), B.getInt8Ty(), "char"); in optimizeSPrintFString()
1694 Value *Ptr = castToCStr(CI->getArgOperand(0), B); in optimizeSPrintFString()
1704 if (!CI->getArgOperand(2)->getType()->isPointerTy()) in optimizeSPrintFString()
1707 Value *Len = emitStrLen(CI->getArgOperand(2), B, DL, TLI); in optimizeSPrintFString()
1712 B.CreateMemCpy(CI->getArgOperand(0), CI->getArgOperand(2), IncLen, 1); in optimizeSPrintFString()
1746 if (!getConstantStringInfo(CI->getArgOperand(1), FormatStr)) in optimizeFPrintFString()
1762 CI->getArgOperand(1), in optimizeFPrintFString()
1764 CI->getArgOperand(0), B, DL, TLI); in optimizeFPrintFString()
1776 if (!CI->getArgOperand(2)->getType()->isIntegerTy()) in optimizeFPrintFString()
1778 return emitFPutC(CI->getArgOperand(2), CI->getArgOperand(0), B, TLI); in optimizeFPrintFString()
1783 if (!CI->getArgOperand(2)->getType()->isPointerTy()) in optimizeFPrintFString()
1785 return emitFPutS(CI->getArgOperand(2), CI->getArgOperand(0), B, TLI); in optimizeFPrintFString()
1815 ConstantInt *SizeC = dyn_cast<ConstantInt>(CI->getArgOperand(1)); in optimizeFWrite()
1816 ConstantInt *CountC = dyn_cast<ConstantInt>(CI->getArgOperand(2)); in optimizeFWrite()
1828 Value *Char = B.CreateLoad(castToCStr(CI->getArgOperand(0), B), "char"); in optimizeFWrite()
1829 Value *NewCI = emitFPutC(Char, CI->getArgOperand(3), B, TLI); in optimizeFWrite()
1849 uint64_t Len = GetStringLength(CI->getArgOperand(0)); in optimizeFPuts()
1855 CI->getArgOperand(0), in optimizeFPuts()
1857 CI->getArgOperand(1), B, DL, TLI); in optimizeFPuts()
1863 if (!getConstantStringInfo(CI->getArgOperand(0), Str)) in optimizePuts()
2188 if (CI->getArgOperand(ObjSizeOp) == CI->getArgOperand(SizeOp)) in isFortifiedCallFoldable()
2191 dyn_cast<ConstantInt>(CI->getArgOperand(ObjSizeOp))) { in isFortifiedCallFoldable()
2198 uint64_t Len = GetStringLength(CI->getArgOperand(SizeOp)); in isFortifiedCallFoldable()
2205 if (ConstantInt *SizeCI = dyn_cast<ConstantInt>(CI->getArgOperand(SizeOp))) in isFortifiedCallFoldable()
2214 B.CreateMemCpy(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeMemCpyChk()
2215 CI->getArgOperand(2), 1); in optimizeMemCpyChk()
2216 return CI->getArgOperand(0); in optimizeMemCpyChk()
2224 B.CreateMemMove(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeMemMoveChk()
2225 CI->getArgOperand(2), 1); in optimizeMemMoveChk()
2226 return CI->getArgOperand(0); in optimizeMemMoveChk()
2236 Value *Val = B.CreateIntCast(CI->getArgOperand(1), B.getInt8Ty(), false); in optimizeMemSetChk()
2237 B.CreateMemSet(CI->getArgOperand(0), Val, CI->getArgOperand(2), 1); in optimizeMemSetChk()
2238 return CI->getArgOperand(0); in optimizeMemSetChk()
2249 Value *Dst = CI->getArgOperand(0), *Src = CI->getArgOperand(1), in optimizeStrpCpyChk()
2250 *ObjSize = CI->getArgOperand(2); in optimizeStrpCpyChk()
2290 Value *Ret = emitStrNCpy(CI->getArgOperand(0), CI->getArgOperand(1), in optimizeStrpNCpyChk()
2291 CI->getArgOperand(2), B, TLI, Name.substr(2, 7)); in optimizeStrpNCpyChk()