Home
last modified time | relevance | path

Searched refs:hasOneUse (Results 1 – 25 of 231) sorted by relevance

12345678910

/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/RISCV/
DRISCVMergeBaseOffset.cpp87 !MRI->hasOneUse(HiLUI.getOperand(0).getReg())) in detectLuiAddiGlobal()
95 !MRI->hasOneUse(LoADDI->getOperand(0).getReg())) in detectLuiAddiGlobal()
144 if (!MRI->hasOneUse(Reg)) in matchLargeOffset()
160 !MRI->hasOneUse(OffsetLui.getOperand(0).getReg())) in matchLargeOffset()
183 assert(MRI->hasOneUse(DestReg) && "expected one use for LoADDI"); in detectAndFoldOffset()
/external/llvm/lib/Transforms/InstCombine/
DInstCombineAndOrXor.cpp31 if (!IsFreeToInvert(Operand, Operand->hasOneUse())) in dyn_castNotVal()
161 if (Op->hasOneUse()) { in OptAndOp()
169 if (Op->hasOneUse()){ in OptAndOp()
191 if (Op->hasOneUse()) { in OptAndOp()
267 if (Op->hasOneUse()) { in OptAndOp()
918 LHS->hasOneUse() && RHS->hasOneUse()) { in FoldAndOfICmps()
1167 if (Op0->hasOneUse() && Op1->hasOneUse()) { in matchDeMorgansLaws()
1342 if (!Op0I->hasOneUse()) break; in visitAnd()
1384 if (Op0I->hasOneUse() && !match(Op0LHS, m_Zero())) { in visitAnd()
1491 if (Op1->hasOneUse() || cast<BinaryOperator>(Op1)->hasOneUse()) in visitAnd()
[all …]
DInstCombineSelect.cpp146 (!TI->hasOneUse() || !FI->hasOneUse())) in FoldSelectOpOp()
149 } else if (!TI->hasOneUse() || !FI->hasOneUse()) { in FoldSelectOpOp()
169 if (!isa<BinaryOperator>(TI) || !TI->hasOneUse() || !FI->hasOneUse()) in FoldSelectOpOp()
234 if (TVI->hasOneUse() && TVI->getNumOperands() == 2 && in FoldSelectIntoOp()
264 if (FVI->hasOneUse() && FVI->getNumOperands() == 2 && in FoldSelectIntoOp()
427 if (ICI->hasOneUse()) in visitSelectInstWithICmp()
849 if (!TI || !FI || !TI->hasOneUse() || !FI->hasOneUse()) in foldAddSubSelect()
1024 if (FCI->hasOneUse() && FCmpInst::isUnordered(FCI->getPredicate())) { in visitSelectInst()
1067 if (FCI->hasOneUse() && FCmpInst::isUnordered(FCI->getPredicate())) { in visitSelectInst()
1160 (SI.hasOneUse() && match(*SI.user_begin(), m_Not(m_Value()))); in visitSelectInst()
[all …]
DInstCombineCasts.cpp100 if (!AI.hasOneUse() && CastElTyAlign == AllocElTyAlign) return nullptr; in PromoteCastOfAllocation()
110 if (!AI.hasOneUse() && CastElTyStoreSize < AllocElTyStoreSize) return nullptr; in PromoteCastOfAllocation()
148 if (!AI.hasOneUse()) { in PromoteCastOfAllocation()
350 if (!I->hasOneUse()) return false; in canEvaluateTruncated()
443 if (!TruncOp->hasOneUse() || !isa<IntegerType>(DestType)) in foldVecTruncToExtElt()
524 if (Src->hasOneUse() && in visitTrunc()
550 if (Src->hasOneUse() && in visitTrunc()
552 cast<Instruction>(Src)->getOperand(0)->hasOneUse()) { in visitTrunc()
567 if (Src->hasOneUse() && isa<IntegerType>(SrcTy) && in visitTrunc()
740 if (!I->hasOneUse()) return false; in canEvaluateZExtd()
[all …]
DInstCombineCompares.cpp973 (GEPLHS->hasAllConstantIndices() || GEPLHS->hasOneUse()) && in FoldGEPICmp()
974 (GEPRHS->hasAllConstantIndices() || GEPRHS->hasOneUse()) && in FoldGEPICmp()
1045 if (GEPsInBounds && (isa<ConstantExpr>(GEPLHS) || GEPLHS->hasOneUse()) && in FoldGEPICmp()
1046 (isa<ConstantExpr>(GEPRHS) || GEPRHS->hasOneUse())) { in FoldGEPICmp()
1412 if (Shr->hasOneUse() && Shr->isExact()) in FoldICmpShrCst()
1415 if (Shr->hasOneUse()) { in FoldICmpShrCst()
1553 if (ICI.isEquality() && LHSI->hasOneUse()) { in visitICmpInstWithInstAndIntCst()
1602 if (LHSI->hasOneUse()) { in visitICmpInstWithInstAndIntCst()
1639 if (LHSI->hasOneUse() && isa<ConstantInt>(LHSI->getOperand(1)) && in visitICmpInstWithInstAndIntCst()
1640 LHSI->getOperand(0)->hasOneUse()) { in visitICmpInstWithInstAndIntCst()
[all …]
DInstCombinePHI.cpp41 if (!I || I->getOpcode() != Opc || !I->hasOneUse() || in FoldPHIArgBinOpIntoPHI()
140 if (!GEP || !GEP->hasOneUse() || GEP->getType() != FirstInst->getType() || in FoldPHIArgGEPIntoPHI()
309 if (!LI || !LI->hasOneUse()) in FoldPHIArgLoadIntoPHI()
426 if (Zext->getSrcTy() != NarrowType || !Zext->hasOneUse()) in FoldPHIArgZextsIntoPHI()
510 if (!I || !I->hasOneUse() || !I->isSameOperationAs(FirstInst)) in FoldPHIArgOpIntoPHI()
578 if (!PN->hasOneUse()) return false; in DeadPHICycle()
746 !UserI->hasOneUse() || !isa<TruncInst>(UserI->user_back()) || in SliceUpIllegalIntegerPHI()
881 PN.getIncomingValue(0)->hasOneUse()) in visitPHINode()
888 if (PN.hasOneUse()) { in visitPHINode()
903 if (PHIUser->hasOneUse() && in visitPHINode()
DInstCombineAddSub.cpp544 InstQuota = ((!isa<Constant>(V0) && V0->hasOneUse()) && in simplify()
545 (!isa<Constant>(V1) && V1->hasOneUse())) ? 2 : 1; in simplify()
980 if (!LHS->hasOneUse() && !RHS->hasOneUse()) in checkForNegativeOperand()
1089 if (LHS->hasOneUse() && (XorRHS->getValue()+1).isPowerOf2()) { in visitAdd()
1156 if (LHS->hasOneUse() && in visitAdd()
1190 if (SI && SI->hasOneUse()) { in visitAdd()
1214 if (LHSConv->hasOneUse() && in visitAdd()
1231 (LHSConv->hasOneUse() || RHSConv->hasOneUse()) && in visitAdd()
1343 if (LHSConv->hasOneUse() && in visitFAdd()
1360 (LHSConv->hasOneUse() || RHSConv->hasOneUse()) && in visitFAdd()
[all …]
DInstCombineVectorOps.cpp49 if (I->getOpcode() == Instruction::Load && I->hasOneUse()) in cheapToScalarize()
52 if (BO->hasOneUse() && in cheapToScalarize()
57 if (CI->hasOneUse() && in cheapToScalarize()
94 if (!PHIUser->hasOneUse() || !(PHIUser->user_back() == PN) || in scalarizePHI()
169 if (EI.getOperand(0)->hasOneUse() && VectorWidth != 1) { in visitExtractElementInst()
203 if (I->hasOneUse() && in visitExtractElementInst()
251 if (CI->hasOneUse() && (CI->getOpcode() != Instruction::BitCast)) { in visitExtractElementInst()
258 if (SI->hasOneUse()) { in visitExtractElementInst()
551 while (V->hasOneUse() && Depth < 10) { in visitInsertValueInst()
602 if (!IE.hasOneUse() || !isa<InsertElementInst>(IE.user_back())) { in visitInsertElementInst()
[all …]
DInstructionCombining.cpp298 Op0->hasOneUse() && Op1->hasOneUse()) { in SimplifyAssociativeOrCommutative()
480 if (!V && LHS->hasOneUse() && RHS->hasOneUse()) in tryFactorization()
500 if (!V && LHS->hasOneUse() && RHS->hasOneUse()) in tryFactorization()
738 if (!SI->hasOneUse()) return nullptr; in FoldOpIntoSelect()
767 if (CI->hasOneUse()) { in FoldOpIntoSelect()
796 if (!PN->hasOneUse()) { in FoldOpIntoPhi()
991 !Src.hasOneUse()) in shouldMergeGEPs()
1085 if (!Op->hasOneUse()) in Descale()
1094 if (!Op->hasOneUse()) in Descale()
1119 if (Amt < logScale || !Op->hasOneUse()) in Descale()
[all …]
DInstCombineShifts.cpp46 if (Op1->hasOneUse() && match(Op1, m_SRem(m_Value(A), m_Power2(B)))) { in commonShiftTransforms()
151 if (!I->hasOneUse()) return false; in CanEvaluateShifted()
414 if (Op0->hasOneUse()) { in FoldShiftByConstant()
427 if (isLeftShift && Op0BO->getOperand(1)->hasOneUse() && in FoldShiftByConstant()
446 if (isLeftShift && Op0BOOp1->hasOneUse() && in FoldShiftByConstant()
463 if (isLeftShift && Op0BO->getOperand(0)->hasOneUse() && in FoldShiftByConstant()
481 if (isLeftShift && Op0BO->getOperand(0)->hasOneUse() && in FoldShiftByConstant()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/InstCombine/
DInstCombineSelect.cpp148 if (!Cmp->hasOneUse()) in foldSelectICmpAnd()
291 (!TI->hasOneUse() || !FI->hasOneUse())) in foldSelectOpOp()
293 } else if (!TI->hasOneUse() || !FI->hasOneUse()) { in foldSelectOpOp()
314 !TI->hasOneUse() || !FI->hasOneUse()) in foldSelectOpOp()
379 if (TVI->hasOneUse() && !isa<Constant>(FalseVal)) { in foldSelectIntoOp()
410 if (FVI->hasOneUse() && !isa<Constant>(TrueVal)) { in foldSelectIntoOp()
454 if (!(Cmp->hasOneUse() && Cmp->getOperand(0)->hasOneUse() && in foldSelectICmpAndAnd()
563 (IC->hasOneUse() + Or->hasOneUse())) in foldSelectICmpAndOr()
630 if (!TrueVal->hasOneUse()) in canonicalizeSaturatedSubtract()
706 if (!Cmp.hasOneUse() || !match(CmpRHS, m_APInt(CmpC))) in adjustMinMax()
[all …]
DInstCombineAndOrXor.cpp99 if (!OldLHS->hasOneUse() && !OldRHS->hasOneUse()) in SimplifyBSwap()
104 if (!OldLHS->hasOneUse()) in SimplifyBSwap()
127 if (Op->hasOneUse()) { in OptAndOp()
961 if (PredL == ICmpInst::ICMP_EQ && PredL == PredR && LHS->hasOneUse() && in foldAndOfICmps()
962 RHS->hasOneUse()) { in foldAndOfICmps()
1150 !IsFreeToInvert(A, A->hasOneUse()) && in matchDeMorgansLaws()
1151 !IsFreeToInvert(B, B->hasOneUse())) { in matchDeMorgansLaws()
1299 if (Op0->hasOneUse() || Op1->hasOneUse()) in foldAndToXor()
1317 if (Op0->hasOneUse() || Op1->hasOneUse()) in foldOrToXor()
1564 if (Op1->hasOneUse() || IsFreeToInvert(C, C->hasOneUse())) in visitAnd()
[all …]
DInstCombineAddSub.cpp557 InstQuota = ((!isa<Constant>(V0) && V0->hasOneUse()) && in simplify()
558 (!isa<Constant>(V1) && V1->hasOneUse())) ? 2 : 1; in simplify()
870 if (!LHS->hasOneUse() && !RHS->hasOneUse()) in checkForNegativeOperand()
976 if (C->isOneValue() && Op0->hasOneUse()) { in foldAddWithConstant()
1181 if (LHS->hasOneUse() && (XorRHS->getValue()+1).isPowerOf2()) { in visitAdd()
1242 if (LHS->hasOneUse() && in visitAdd()
1271 if (SI && SI->hasOneUse()) { in visitAdd()
1293 if (LHSConv->hasOneUse()) { in visitAdd()
1313 (LHSConv->hasOneUse() || RHSConv->hasOneUse()) && in visitAdd()
1329 if (LHSConv->hasOneUse()) { in visitAdd()
[all …]
DInstCombinePHI.cpp99 if (!PN.hasOneUse()) in FoldIntegerTypedPHI()
169 if (!LoadI->hasOneUse()) in FoldIntegerTypedPHI()
248 (LoadI && LoadI->hasOneUse())) && in FoldIntegerTypedPHI()
297 if (!I || I->getOpcode() != Opc || !I->hasOneUse() || in FoldPHIArgBinOpIntoPHI()
396 if (!GEP || !GEP->hasOneUse() || GEP->getType() != FirstInst->getType() || in FoldPHIArgGEPIntoPHI()
565 if (!LI || !LI->hasOneUse()) in FoldPHIArgLoadIntoPHI()
682 if (Zext->getSrcTy() != NarrowType || !Zext->hasOneUse()) in FoldPHIArgZextsIntoPHI()
766 if (!I || !I->hasOneUse() || !I->isSameOperationAs(FirstInst)) in FoldPHIArgOpIntoPHI()
834 if (!PN->hasOneUse()) return false; in DeadPHICycle()
1002 !UserI->hasOneUse() || !isa<TruncInst>(UserI->user_back()) || in SliceUpIllegalIntegerPHI()
[all …]
DInstCombineVectorOps.cpp72 if (I->getOpcode() == Instruction::Load && I->hasOneUse()) in cheapToScalarize()
75 if (BO->hasOneUse() && in cheapToScalarize()
80 if (CI->hasOneUse() && in cheapToScalarize()
117 if (!PHIUser->hasOneUse() || !(PHIUser->user_back() == PN) || in scalarizePHI()
195 if (EI.getOperand(0)->hasOneUse() && VectorWidth != 1) { in visitExtractElementInst()
229 if (I->hasOneUse() && in visitExtractElementInst()
277 if (CI->hasOneUse() && (CI->getOpcode() != Instruction::BitCast)) { in visitExtractElementInst()
414 if (InsElt->hasOneUse() && isa<InsertElementInst>(InsElt->user_back())) in replaceExtractElements()
552 while (V->hasOneUse() && Depth < 10) { in visitInsertValueInst()
596 if (InsElt.hasOneUse() && isa<InsertElementInst>(InsElt.user_back())) in foldInsSequenceIntoBroadcast()
[all …]
DInstCombineCasts.cpp103 if (!AI.hasOneUse() && CastElTyAlign == AllocElTyAlign) return nullptr; in PromoteCastOfAllocation()
113 if (!AI.hasOneUse() && CastElTyStoreSize < AllocElTyStoreSize) return nullptr; in PromoteCastOfAllocation()
151 if (!AI.hasOneUse()) { in PromoteCastOfAllocation()
272 if (CSrc->hasOneUse()) in commonCastTransforms()
325 if (!V->hasOneUse()) in canNotEvaluateInType()
460 if (!TruncOp->hasOneUse() || !isa<IntegerType>(DestType)) in foldVecTruncToExtElt()
626 if (Shuf && Shuf->hasOneUse() && isa<UndefValue>(Shuf->getOperand(1)) && in shrinkSplatShuffle()
650 if (!InsElt || !InsElt->hasOneUse()) in shrinkInsertElt()
722 if (Src->hasOneUse() && in visitTrunc()
749 if (Src->hasOneUse() && in visitTrunc()
[all …]
DInstCombineCompares.cpp919 (GEPLHS->hasAllConstantIndices() || GEPLHS->hasOneUse()) && in foldGEPICmp()
920 (GEPRHS->hasAllConstantIndices() || GEPRHS->hasOneUse()) && in foldGEPICmp()
991 if (GEPsInBounds && (isa<ConstantExpr>(GEPLHS) || GEPLHS->hasOneUse()) && in foldGEPICmp()
992 (isa<ConstantExpr>(GEPRHS) || GEPRHS->hasOneUse())) { in foldGEPICmp()
1246 if (!AddWithCst->hasOneUse()) in processUGT_ADDCST_ADD()
1432 if (Cmp.isEquality() && Trunc->hasOneUse()) { in foldICmpTruncConstant()
1484 if (Xor->hasOneUse()) { in foldICmpXorConstant()
1581 if (Shift->hasOneUse() && C1.isNullValue() && Cmp.isEquality() && in foldICmpAndShift()
1605 if (!And->hasOneUse()) in foldICmpAndConstConst()
1639 if (!Cmp.isSigned() && C1.isNullValue() && And->getOperand(0)->hasOneUse() && in foldICmpAndConstConst()
[all …]
DInstCombineMulDivRem.cpp55 if (!V->hasOneUse()) return nullptr; in simplifyValueKnownNonZero()
199 if (Op0->hasOneUse()) { in visitMul()
259 if (Div && Div->hasOneUse() && in visitMul()
331 if (Op0Conv->hasOneUse()) { in visitMul()
351 (Op0Conv->hasOneUse() || Op1Conv->hasOneUse()) && in visitMul()
367 if (Op0Conv->hasOneUse()) { in visitMul()
387 (Op0Conv->hasOneUse() || Op1Conv->hasOneUse()) && in visitMul()
478 if (Op0->hasOneUse() && C1DivC->isNormalFP()) in visitFMul()
583 if (SI->use_empty() && SelectCond->hasOneUse()) in simplifyDivRemOfSelectWithZeroOp()
904 X->getType() == Y->getType() && (N->hasOneUse() || D->hasOneUse())) { in narrowUDivURem()
[all …]
DInstructionCombining.cpp238 if (!Cast || !Cast->hasOneUse()) in simplifyAssocCastAssoc()
252 if (!BinOp2 || !BinOp2->hasOneUse() || BinOp2->getOpcode() != AssocOpcode) in simplifyAssocCastAssoc()
535 if (!V && LHS->hasOneUse() && RHS->hasOneUse()) in tryFactorization()
555 if (!V && LHS->hasOneUse() && RHS->hasOneUse()) in tryFactorization()
726 bool SelectsHaveOneUse = LHS->hasOneUse() && RHS->hasOneUse(); in SimplifySelectsFeedingBinaryOp()
811 if (!SI->hasOneUse()) in FoldOpIntoSelect()
846 if (CI->hasOneUse()) { in FoldOpIntoSelect()
889 if (!PN->hasOneUse()) { in foldOpIntoPhi()
1107 !Src.hasOneUse()) in shouldMergeGEPs()
1199 if (!Op->hasOneUse()) in Descale()
[all …]
DInstCombineShifts.cpp56 if (Op1->hasOneUse() && match(Op1, m_SRem(m_Value(A), m_Power2(B)))) { in commonShiftTransforms()
158 if (!I->hasOneUse()) return false; in canEvaluateShifted()
423 if (Op0->hasOneUse()) { in FoldShiftByConstant()
436 if (isLeftShift && Op0BO->getOperand(1)->hasOneUse() && in FoldShiftByConstant()
455 if (isLeftShift && Op0BOOp1->hasOneUse() && in FoldShiftByConstant()
471 if (isLeftShift && Op0BO->getOperand(0)->hasOneUse() && in FoldShiftByConstant()
489 if (isLeftShift && Op0BO->getOperand(0)->hasOneUse() && in FoldShiftByConstant()
781 if (Op0->hasOneUse()) { in visitLShr()
788 if (ShAmt == BitWidth - SrcTyBitWidth && Op0->hasOneUse()) { in visitLShr()
/external/llvm/lib/Transforms/Scalar/
DReassociate.cpp129 if (V->hasOneUse() && isa<Instruction>(V) && in isReassociableOp()
139 if (V->hasOneUse() && isa<Instruction>(V) && in isReassociableOp()
501 if (!Op->hasOneUse()) { in LinearizeExprTree()
520 assert(!Op->hasOneUse() && "Only one use, but we got here twice!"); in LinearizeExprTree()
538 if (!Op->hasOneUse()) in LinearizeExprTree()
555 assert(Op->hasOneUse() && "Has uses outside the expression tree!"); in LinearizeExprTree()
895 if (Sub->hasOneUse() && in ShouldBreakUpSubtract()
1166 if (!Opnd1->getValue()->hasOneUse()) in CombineXorOpnd()
1203 if (Opnd1->getValue()->hasOneUse()) in CombineXorOpnd()
1205 if (Opnd2->getValue()->hasOneUse()) in CombineXorOpnd()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/
DReassociate.cpp149 if (I && I->hasOneUse() && I->getOpcode() == Opcode) in isReassociableOp()
158 if (I && I->hasOneUse() && in isReassociableOp()
515 if (!Op->hasOneUse()) { in LinearizeExprTree()
536 assert(!Op->hasOneUse() && "Only one use, but we got here twice!"); in LinearizeExprTree()
554 if (!Op->hasOneUse()) in LinearizeExprTree()
571 assert(Op->hasOneUse() && "Has uses outside the expression tree!"); in LinearizeExprTree()
920 if (Sub->hasOneUse() && in ShouldBreakUpSubtract()
1189 if (!Opnd1->getValue()->hasOneUse()) in CombineXorOpnd()
1223 if (Opnd1->getValue()->hasOneUse()) in CombineXorOpnd()
1225 if (Opnd2->getValue()->hasOneUse()) in CombineXorOpnd()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/SelectionDAG/
DDAGCombiner.cpp668 if (Op->hasOneUse() || Op->getNumValues() > 1) in deleteAndRecombine()
687 if (!Op.hasOneUse()) in isNegatibleForFree()
863 if (isSetCCEquivalent(N, N0, N1, N2) && N.getNode()->hasOneUse()) in isOneUseSetCC()
955 if (N0.hasOneUse()) { in ReassociateOps()
975 if (N1.hasOneUse()) { in ReassociateOps()
1206 Replace0 &= !N0->hasOneUse(); in PromoteIntBinOp()
1207 Replace1 &= (N0 != N1) && !N1->hasOneUse(); in PromoteIntBinOp()
1723 if (Op.hasOneUse() && !is_contained(TFs, Op.getNode())) { in visitTokenFactor()
1890 if (Sel.getOpcode() != ISD::SELECT || !Sel.hasOneUse()) { in foldBinOpIntoSelect()
1895 if (Sel.getOpcode() != ISD::SELECT || !Sel.hasOneUse()) in foldBinOpIntoSelect()
[all …]
/external/llvm/lib/CodeGen/SelectionDAG/
DDAGCombiner.cpp577 if (Op->hasOneUse() || Op->getNumValues() > 1) in deleteAndRecombine()
594 if (!Op.hasOneUse()) return 0; in isNegatibleForFree()
656 assert(Op.hasOneUse() && "Unknown reuse!"); in GetNegatedExpression()
763 if (isSetCCEquivalent(N, N0, N1, N2) && N.getNode()->hasOneUse()) in isOneUseSetCC()
827 if (N0.hasOneUse()) { in ReassociateOps()
847 if (N1.hasOneUse()) { in ReassociateOps()
1565 if (Op.hasOneUse() && in visitTokenFactor()
2101 N0.getNode()->hasOneUse()) { in visitMUL()
2105 N1.getNode()->hasOneUse()) { in visitMUL()
2804 if (SVN0->hasOneUse() && SVN1->hasOneUse() && in SimplifyBinOpWithSameOpcodeHands()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/AMDGPU/
DAMDGPULowerKernelAttributes.cpp98 if (!U->hasOneUse()) in processUse()
106 if (!BCI || !BCI->hasOneUse()) in processUse()

12345678910