Home
last modified time | relevance | path

Searched refs:replaceInstUsesWith (Results 1 – 25 of 28) sorted by relevance

12

/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/InstCombine/
DInstCombineCalls.cpp1264 return IC.replaceInstUsesWith(II, II.getArgOperand(3)); in simplifyMaskedGather()
1333 return IC.replaceInstUsesWith(II, C); in foldCttzCtlz()
1403 return IC.replaceInstUsesWith(II, ZeroVec); in simplifyX86MaskedLoad()
1425 return IC.replaceInstUsesWith(II, NewMaskedLoad); in simplifyX86MaskedLoad()
1860 return replaceInstUsesWith(CI, V); in visitCallInst()
1951 return replaceInstUsesWith(CI, N); in visitCallInst()
1969 return replaceInstUsesWith(CI, SimplifiedMaskedOp); in visitCallInst()
1980 return replaceInstUsesWith(*II, SkippedBarrier); in visitCallInst()
2050 return replaceInstUsesWith(*II, V); in visitCallInst()
2076 return replaceInstUsesWith(*II, Add); in visitCallInst()
[all …]
DInstCombineVectorOps.cpp164 replaceInstUsesWith(*E, scalarPHI); in scalarizePHI()
173 return replaceInstUsesWith(EI, V); in visitExtractElementInst()
179 return replaceInstUsesWith(EI, C->getAggregateElement(0U)); in visitExtractElementInst()
243 return replaceInstUsesWith(EI, IE->getOperand(1)); in visitExtractElementInst()
261 return replaceInstUsesWith(EI, UndefValue::get(EI.getType())); in visitExtractElementInst()
437 IC.replaceInstUsesWith(*OldExt, NewExt); in replaceExtractElements()
566 return replaceInstUsesWith(I, I.getOperand(0)); in visitInsertValueInst()
788 return replaceInstUsesWith(IE, V); in visitInsertElementInst()
792 replaceInstUsesWith(IE, VecOp); in visitInsertElementInst()
806 return replaceInstUsesWith(IE, VecOp); in visitInsertElementInst()
[all …]
DInstCombineCompares.cpp354 return replaceInstUsesWith(ICI, Builder.getFalse()); in foldCmpLoadFromIndexedGlobal()
374 return replaceInstUsesWith(ICI, Builder.getTrue()); in foldCmpLoadFromIndexedGlobal()
941 return replaceInstUsesWith(I, Cmp); in foldGEPICmp()
978 return replaceInstUsesWith(I, // No comparison is needed here. in foldGEPICmp()
1077 return replaceInstUsesWith( in foldAllocaCmp()
1186 return replaceInstUsesWith(I, TorF); in foldICmpShrConstConst()
1225 return replaceInstUsesWith(I, TorF); in foldICmpShlConstConst()
1312 IC.replaceInstUsesWith(*OrigAdd, ZExt); in processUGT_ADDCST_ADD()
1392 return replaceInstUsesWith(Cmp, Builder.getFalse()); in foldICmpWithConstant()
1394 return replaceInstUsesWith(Cmp, Builder.getTrue()); in foldICmpWithConstant()
[all …]
DInstCombineSelect.cpp925 return replaceInstUsesWith(SI, V); in foldSelectInstWithICmp()
989 return replaceInstUsesWith(SI, V); in foldSelectInstWithICmp()
998 return replaceInstUsesWith(SI, V); in foldSelectInstWithICmp()
1001 return replaceInstUsesWith(SI, V); in foldSelectInstWithICmp()
1004 return replaceInstUsesWith(SI, V); in foldSelectInstWithICmp()
1058 return replaceInstUsesWith(Outer, Inner); in foldSPFofSPF()
1066 return replaceInstUsesWith(Outer, C); in foldSPFofSPF()
1078 return replaceInstUsesWith(Outer, Inner); in foldSPFofSPF()
1095 return replaceInstUsesWith(Outer, Inner); in foldSPFofSPF()
1106 return replaceInstUsesWith(Outer, NewSI); in foldSPFofSPF()
[all …]
DInstCombineAndOrXor.cpp1406 return replaceInstUsesWith(I, V); in visitAnd()
1425 return replaceInstUsesWith(I, V); in visitAnd()
1428 return replaceInstUsesWith(I, V); in visitAnd()
1595 return replaceInstUsesWith(I, Res); in visitAnd()
1603 return replaceInstUsesWith(I, Builder.CreateAnd(Res, Y)); in visitAnd()
1606 return replaceInstUsesWith(I, Builder.CreateAnd(Res, X)); in visitAnd()
1611 return replaceInstUsesWith(I, Builder.CreateAnd(Res, Y)); in visitAnd()
1614 return replaceInstUsesWith(I, Builder.CreateAnd(Res, X)); in visitAnd()
1621 return replaceInstUsesWith(I, Res); in visitAnd()
2005 return replaceInstUsesWith(I, V); in visitOr()
[all …]
DInstCombineAddSub.cpp1133 return replaceInstUsesWith(I, V); in visitAdd()
1143 return replaceInstUsesWith(I, V); in visitAdd()
1221 return replaceInstUsesWith(I, V); in visitAdd()
1229 if (Value *V = SimplifyAddWithRemainder(I)) return replaceInstUsesWith(I, V); in visitAdd()
1398 return replaceInstUsesWith(I, V); in visitFAdd()
1478 return replaceInstUsesWith(I, V); in visitFAdd()
1482 return replaceInstUsesWith(I, V); in visitFAdd()
1578 return replaceInstUsesWith(I, V); in visitSub()
1585 return replaceInstUsesWith(I, V); in visitSub()
1695 return replaceInstUsesWith(I, SI); in visitSub()
[all …]
DInstCombineCasts.cpp155 replaceInstUsesWith(AI, NewCast); in PromoteCastOfAllocation()
157 return replaceInstUsesWith(CI, New); in PromoteCastOfAllocation()
692 return replaceInstUsesWith(CI, Res); in visitTrunc()
733 return replaceInstUsesWith(CI, Constant::getNullValue(DestTy)); in visitTrunc()
835 return replaceInstUsesWith(CI, In); in transformZExtICmp()
861 return replaceInstUsesWith(CI, Res); in transformZExtICmp()
879 return replaceInstUsesWith(CI, In); in transformZExtICmp()
882 return replaceInstUsesWith(CI, IntCast); in transformZExtICmp()
918 return replaceInstUsesWith(CI, Result); in transformZExtICmp()
1096 return replaceInstUsesWith(CI, Res); in visitZExt()
[all …]
DInstCombineMulDivRem.cpp131 return replaceInstUsesWith(I, V); in visitMul()
140 return replaceInstUsesWith(I, V); in visitMul()
268 return replaceInstUsesWith(I, X); in visitMul()
416 return replaceInstUsesWith(I, V); in visitFMul()
456 return replaceInstUsesWith(I, V); in visitFMul()
507 return replaceInstUsesWith(I, Sqrt); in visitFMul()
934 return replaceInstUsesWith(I, V); in visitUDiv()
1028 return replaceInstUsesWith(I, V); in visitSDiv()
1176 return replaceInstUsesWith(I, V); in visitFDiv()
1233 return replaceInstUsesWith(I, Res); in visitFDiv()
[all …]
DInstCombineLoadStoreAlloca.cpp223 return IC.replaceInstUsesWith(AI, GEP); in simplifyAllocaArraySize()
227 return IC.replaceInstUsesWith(AI, Constant::getNullValue(AI.getType())); in simplifyAllocaArraySize()
305 IC.replaceInstUsesWith(*LT, NewI); in replace()
390 return replaceInstUsesWith(AI, EntryAI); in visitAllocaInst()
420 Instruction *NewI = replaceInstUsesWith(AI, Cast); in visitAllocaInst()
699 return IC.replaceInstUsesWith(LI, IC.Builder.CreateInsertValue( in unpackLoadToAggregate()
736 return IC.replaceInstUsesWith(LI, V); in unpackLoadToAggregate()
747 return IC.replaceInstUsesWith(LI, IC.Builder.CreateInsertValue( in unpackLoadToAggregate()
787 return IC.replaceInstUsesWith(LI, V); in unpackLoadToAggregate()
1029 return replaceInstUsesWith( in visitLoadInst()
[all …]
DInstCombinePHI.cpp1013 return replaceInstUsesWith(FirstPhi, UndefValue::get(FirstPhi.getType())); in SliceUpIllegalIntegerPHI()
1108 replaceInstUsesWith(*PHIUsers[UserI].Inst, EltPHI); in SliceUpIllegalIntegerPHI()
1115 replaceInstUsesWith(*PHIsToSlice[i], Undef); in SliceUpIllegalIntegerPHI()
1116 return replaceInstUsesWith(FirstPhi, Undef); in SliceUpIllegalIntegerPHI()
1123 return replaceInstUsesWith(PN, V); in visitPHINode()
1152 return replaceInstUsesWith(PN, UndefValue::get(PN.getType())); in visitPHINode()
1164 return replaceInstUsesWith(PN, UndefValue::get(PN.getType())); in visitPHINode()
1221 return replaceInstUsesWith(PN, NonPhiInVal); in visitPHINode()
DInstructionCombining.cpp1020 replaceInstUsesWith(*User, NewPN); in foldOpIntoPhi()
1023 return replaceInstUsesWith(I, NewPN); in foldOpIntoPhi()
1444 return replaceInstUsesWith(GEP, V); in visitGetElementPtrInst()
1990 replaceInstUsesWith(*BCI, I); in visitGetElementPtrInst()
2012 return replaceInstUsesWith(GEP, NGEP); in visitGetElementPtrInst()
2167 replaceInstUsesWith(*I, Result); in visitAllocSite()
2180 replaceInstUsesWith(*C, in visitAllocSite()
2185 replaceInstUsesWith(*I, UndefValue::get(I->getType())); in visitAllocSite()
2404 return replaceInstUsesWith(EV, Agg); in visitExtractValueInst()
2408 return replaceInstUsesWith(EV, V); in visitExtractValueInst()
[all …]
DInstCombineShifts.cpp364 return replaceInstUsesWith( in FoldShiftByConstant()
594 return replaceInstUsesWith(I, V); in visitShl()
698 return replaceInstUsesWith(I, V); in visitLShr()
826 return replaceInstUsesWith(I, V); in visitAShr()
/external/llvm/lib/Transforms/InstCombine/
DInstCombineSelect.cpp533 return replaceInstUsesWith(SI, Builder->CreateOr(AShr, C1)); in visitSelectInstWithICmp()
536 return replaceInstUsesWith(SI, Builder->CreateAdd(And, C1)); in visitSelectInstWithICmp()
599 return replaceInstUsesWith(SI, V); in visitSelectInstWithICmp()
604 return replaceInstUsesWith(SI, V); in visitSelectInstWithICmp()
607 return replaceInstUsesWith(SI, V); in visitSelectInstWithICmp()
663 return replaceInstUsesWith(Outer, Inner); in FoldSPFofSPF()
671 return replaceInstUsesWith(Outer, C); in FoldSPFofSPF()
686 return replaceInstUsesWith(Outer, Inner); in FoldSPFofSPF()
704 return replaceInstUsesWith(Outer, Inner); in FoldSPFofSPF()
714 return replaceInstUsesWith(Outer, NewSI); in FoldSPFofSPF()
[all …]
DInstCombineVectorOps.cpp141 replaceInstUsesWith(*E, scalarPHI); in scalarizePHI()
149 return replaceInstUsesWith(EI, V); in visitExtractElementInst()
155 return replaceInstUsesWith(EI, C->getAggregateElement(0U)); in visitExtractElementInst()
217 return replaceInstUsesWith(EI, IE->getOperand(1)); in visitExtractElementInst()
235 return replaceInstUsesWith(EI, UndefValue::get(EI.getType())); in visitExtractElementInst()
436 IC.replaceInstUsesWith(*OldExt, NewExt); in replaceExtractElements()
565 return replaceInstUsesWith(I, I.getOperand(0)); in visitInsertValueInst()
576 replaceInstUsesWith(IE, VecOp); in visitInsertElementInst()
590 return replaceInstUsesWith(IE, VecOp); in visitInsertElementInst()
593 return replaceInstUsesWith(IE, UndefValue::get(IE.getType())); in visitInsertElementInst()
[all …]
DInstCombineCalls.cpp1093 return IC.replaceInstUsesWith(II, II.getArgOperand(3)); in simplifyMaskedGather()
1118 return IC.replaceInstUsesWith(II, ZeroVec); in simplifyX86MaskedLoad()
1140 return IC.replaceInstUsesWith(II, NewMaskedLoad); in simplifyX86MaskedLoad()
1247 return replaceInstUsesWith(CI, V); in visitCallInst()
1342 return replaceInstUsesWith(CI, ConstantInt::get(II->getType(), APSize)); in visitCallInst()
1352 return replaceInstUsesWith(CI, X); in visitCallInst()
1371 return replaceInstUsesWith(CI, X); in visitCallInst()
1377 return replaceInstUsesWith(CI, SimplifiedMaskedOp); in visitCallInst()
1390 return replaceInstUsesWith(CI, ConstantFP::get(CI.getType(), 1.0)); in visitCallInst()
1393 return replaceInstUsesWith(CI, II->getArgOperand(0)); in visitCallInst()
[all …]
DInstCombineMulDivRem.cpp180 return replaceInstUsesWith(I, V); in visitMul()
183 return replaceInstUsesWith(I, V); in visitMul()
186 return replaceInstUsesWith(I, V); in visitMul()
326 return replaceInstUsesWith(I, Op0BO); in visitMul()
542 return replaceInstUsesWith(I, V); in visitFMul()
549 return replaceInstUsesWith(I, V); in visitFMul()
580 return replaceInstUsesWith(I, V); in visitFMul()
622 return replaceInstUsesWith(I, II->getOperand(0)); in visitFMul()
658 return replaceInstUsesWith(I, FSub); in visitFMul()
678 return replaceInstUsesWith(I, FMul); in visitFMul()
[all …]
DInstCombineCompares.cpp411 return replaceInstUsesWith(ICI, Builder->getFalse()); in FoldCmpLoadFromIndexedGlobal()
431 return replaceInstUsesWith(ICI, Builder->getTrue()); in FoldCmpLoadFromIndexedGlobal()
995 return replaceInstUsesWith(I, Cmp); in FoldGEPICmp()
1032 return replaceInstUsesWith(I, // No comparison is needed here. in FoldGEPICmp()
1131 return replaceInstUsesWith( in FoldAllocaCmp()
1302 return replaceInstUsesWith(ICI, Builder->getFalse()); in FoldICmpDivCst()
1309 return replaceInstUsesWith(ICI, InsertRangeTest(X, LoBound, HiBound, in FoldICmpDivCst()
1313 return replaceInstUsesWith(ICI, Builder->getTrue()); in FoldICmpDivCst()
1320 return replaceInstUsesWith(ICI, InsertRangeTest(X, LoBound, HiBound, in FoldICmpDivCst()
1325 return replaceInstUsesWith(ICI, Builder->getTrue()); in FoldICmpDivCst()
[all …]
DInstCombineAndOrXor.cpp235 return replaceInstUsesWith(TheAnd, Op); // No need for the and. in OptAndOp()
255 return replaceInstUsesWith(TheAnd, Op); in OptAndOp()
1313 return replaceInstUsesWith(I, V); in visitAnd()
1316 return replaceInstUsesWith(I, V); in visitAnd()
1320 return replaceInstUsesWith(I, V); in visitAnd()
1328 return replaceInstUsesWith(I, V); in visitAnd()
1516 return replaceInstUsesWith(I, Res); in visitAnd()
1524 return replaceInstUsesWith(I, Builder->CreateAnd(Res, Y)); in visitAnd()
1527 return replaceInstUsesWith(I, Builder->CreateAnd(Res, X)); in visitAnd()
1532 return replaceInstUsesWith(I, Builder->CreateAnd(Res, Y)); in visitAnd()
[all …]
DInstCombineAddSub.cpp1035 return replaceInstUsesWith(I, V); in visitAdd()
1039 return replaceInstUsesWith(I, V); in visitAdd()
1043 return replaceInstUsesWith(I, V); in visitAdd()
1140 return replaceInstUsesWith(I, V); in visitAdd()
1300 return replaceInstUsesWith(I, V); in visitFAdd()
1304 return replaceInstUsesWith(I, V); in visitFAdd()
1398 return replaceInstUsesWith(I, V); in visitFAdd()
1476 return replaceInstUsesWith(I, V); in visitSub()
1480 return replaceInstUsesWith(I, V); in visitSub()
1484 return replaceInstUsesWith(I, V); in visitSub()
[all …]
DInstCombineCasts.cpp152 replaceInstUsesWith(AI, NewCast); in PromoteCastOfAllocation()
154 return replaceInstUsesWith(CI, New); in PromoteCastOfAllocation()
511 return replaceInstUsesWith(CI, Res); in visitTrunc()
535 return replaceInstUsesWith(CI, Constant::getNullValue(DestTy)); in visitTrunc()
609 return replaceInstUsesWith(CI, In); in transformZExtICmp()
639 return replaceInstUsesWith(CI, Res); in transformZExtICmp()
657 return replaceInstUsesWith(CI, In); in transformZExtICmp()
697 return replaceInstUsesWith(CI, Result); in transformZExtICmp()
875 return replaceInstUsesWith(CI, Res); in visitZExt()
989 return replaceInstUsesWith(CI, In); in transformSExtICmp()
[all …]
DInstCombineLoadStoreAlloca.cpp208 return IC.replaceInstUsesWith(AI, GEP); in simplifyAllocaArraySize()
212 return IC.replaceInstUsesWith(AI, Constant::getNullValue(AI.getType())); in simplifyAllocaArraySize()
274 return replaceInstUsesWith(AI, EntryAI); in visitAllocaInst()
298 Instruction *NewI = replaceInstUsesWith(AI, Cast); in visitAllocaInst()
537 return IC.replaceInstUsesWith(LI, IC.Builder->CreateInsertValue( in unpackLoadToAggregate()
570 return IC.replaceInstUsesWith(LI, V); in unpackLoadToAggregate()
578 return IC.replaceInstUsesWith(LI, IC.Builder->CreateInsertValue( in unpackLoadToAggregate()
608 return IC.replaceInstUsesWith(LI, V); in unpackLoadToAggregate()
838 return replaceInstUsesWith( in visitLoadInst()
858 return replaceInstUsesWith(LI, UndefValue::get(LI.getType())); in visitLoadInst()
[all …]
DInstCombinePHI.cpp757 return replaceInstUsesWith(FirstPhi, UndefValue::get(FirstPhi.getType())); in SliceUpIllegalIntegerPHI()
853 replaceInstUsesWith(*PHIUsers[UserI].Inst, EltPHI); in SliceUpIllegalIntegerPHI()
860 replaceInstUsesWith(*PHIsToSlice[i], Undef); in SliceUpIllegalIntegerPHI()
861 return replaceInstUsesWith(FirstPhi, Undef); in SliceUpIllegalIntegerPHI()
868 return replaceInstUsesWith(PN, V); in visitPHINode()
894 return replaceInstUsesWith(PN, UndefValue::get(PN.getType())); in visitPHINode()
906 return replaceInstUsesWith(PN, UndefValue::get(PN.getType())); in visitPHINode()
963 return replaceInstUsesWith(PN, NonPhiInVal); in visitPHINode()
DInstCombineShifts.cpp344 return replaceInstUsesWith( in FoldShiftByConstant()
577 return replaceInstUsesWith(I, Constant::getNullValue(I.getType())); in FoldShiftByConstant()
698 return replaceInstUsesWith(I, V); in visitShl()
703 return replaceInstUsesWith(I, V); in visitShl()
740 return replaceInstUsesWith(I, V); in visitLShr()
744 return replaceInstUsesWith(I, V); in visitLShr()
784 return replaceInstUsesWith(I, V); in visitAShr()
788 return replaceInstUsesWith(I, V); in visitAShr()
DInstructionCombining.cpp918 replaceInstUsesWith(*User, NewPN); in FoldOpIntoPhi()
921 return replaceInstUsesWith(I, NewPN); in FoldOpIntoPhi()
1334 return replaceInstUsesWith(GEP, V); in visitGetElementPtrInst()
1820 replaceInstUsesWith(*BCI, I); in visitGetElementPtrInst()
1842 return replaceInstUsesWith(GEP, NGEP); in visitGetElementPtrInst()
1972 replaceInstUsesWith(*I, ConstantInt::get(I->getType(), Size)); in visitAllocSite()
1985 replaceInstUsesWith(*C, in visitAllocSite()
1989 replaceInstUsesWith(*I, UndefValue::get(I->getType())); in visitAllocSite()
2235 return replaceInstUsesWith(EV, Agg); in visitExtractValueInst()
2239 return replaceInstUsesWith(EV, V); in visitExtractValueInst()
[all …]
DInstCombineInternal.h426 Instruction *replaceInstUsesWith(Instruction &I, Value *V) { in replaceInstUsesWith() function

12