/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineAndOrXor.cpp | 31 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 …]
|
D | InstCombineSelect.cpp | 146 (!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 …]
|
D | InstCombineCasts.cpp | 100 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 …]
|
D | InstCombineCompares.cpp | 973 (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 …]
|
D | InstCombinePHI.cpp | 41 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()
|
D | InstCombineAddSub.cpp | 544 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 …]
|
D | InstructionCombining.cpp | 298 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 …]
|
D | InstCombineVectorOps.cpp | 49 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 …]
|
D | InstCombineShifts.cpp | 46 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()
|
D | InstCombineMulDivRem.cpp | 33 if (!V->hasOneUse()) return nullptr; in simplifyValueKnownNonZero() 252 if (Op0->hasOneUse()) { in visitMul() 316 if (BO && BO->hasOneUse() && in visitMul() 409 if (!Op->hasOneUse()) in detectLog2OfHalf() 420 if (!OpLog2Of->hasOneUse()) in detectLog2OfHalf() 509 if (FMulOrDiv->hasOneUse()) { in foldFMulConst() 681 if (Opnd0->hasOneUse()) { in visitFMul() 700 if (Opnd0->hasOneUse() && in visitFMul() 759 if (SI->use_empty() && SelectCond->hasOneUse()) in SimplifyDivRemOfSelect() 1336 if (Op0->hasOneUse() && match(Op0, m_FDiv(m_Value(X), m_Value(Y)))) { in visitFDiv() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/ |
D | InstCombineAndOrXor.cpp | 45 return CI->hasOneUse(); in isFreeToInvert() 205 if (Op->hasOneUse()) { in OptAndOp() 213 if (Op->hasOneUse()){ in OptAndOp() 235 if (Op->hasOneUse()) { in OptAndOp() 313 if (Op->hasOneUse()) { in OptAndOp() 777 LHS->hasOneUse() && RHS->hasOneUse()) { in FoldAndOfICmps() 1061 if (!Op0I->hasOneUse()) break; in visitAnd() 1099 if (Op0I->hasOneUse() && !match(Op0LHS, m_Zero())) { in visitAnd() 1157 if (Op0->hasOneUse() && Op1->hasOneUse()) { in visitAnd() 1181 if (Op0->hasOneUse() && in visitAnd() [all …]
|
D | InstCombineCasts.cpp | 100 if (!AI.hasOneUse() && CastElTyAlign == AllocElTyAlign) return 0; in PromoteCastOfAllocation() 141 if (!AI.hasOneUse()) { in PromoteCastOfAllocation() 346 if (!I->hasOneUse()) return false; in CanEvaluateTruncated() 467 if (Src->hasOneUse() && in visitTrunc() 490 if (Src->hasOneUse() && isa<IntegerType>(Src->getType()) && in visitTrunc() 665 if (!I->hasOneUse()) return false; in CanEvaluateZExtd() 749 if (CI.hasOneUse() && isa<TruncInst>(CI.use_back())) in visitZExt() 841 if (LHS && RHS && LHS->hasOneUse() && RHS->hasOneUse() && in visitZExt() 851 if (SrcI && SrcI->getOpcode() == Instruction::And && SrcI->hasOneUse()) in visitZExt() 862 if (SrcI && SrcI->getOpcode() == Instruction::Xor && SrcI->hasOneUse()) in visitZExt() [all …]
|
D | InstCombineAddSub.cpp | 38 if (!V->hasOneUse() || !V->getType()->isIntegerTy()) in dyn_castFoldableMul() 236 if (LHS->hasOneUse() && in visitAdd() 270 if (SI && SI->hasOneUse()) { in visitAdd() 294 if (LHSConv->hasOneUse() && in visitAdd() 310 (LHSConv->hasOneUse() || RHSConv->hasOneUse()) && in visitAdd() 367 if (LHSConv->hasOneUse() && in visitFAdd() 383 (LHSConv->hasOneUse() || RHSConv->hasOneUse()) && in visitFAdd() 604 if (Op1->hasOneUse()) { in visitSub()
|
D | InstCombineVectorOps.cpp | 40 if (I->getOpcode() == Instruction::Load && I->hasOneUse()) in CheapToScalarize() 43 if (BO->hasOneUse() && in CheapToScalarize() 48 if (CI->hasOneUse() && in CheapToScalarize() 160 if (EI.getOperand(0)->hasOneUse() && VectorWidth != 1) { in visitExtractElementInst() 190 if (I->hasOneUse() && in visitExtractElementInst() 236 if (CI->hasOneUse() && EI.hasOneUse() && in visitExtractElementInst() 423 if (!IE.hasOneUse() || !isa<InsertElementInst>(IE.use_back())) { in visitInsertElementInst()
|
D | InstCombineCompares.cpp | 668 (isa<ConstantExpr>(GEPLHS) || GEPLHS->hasOneUse()) && in FoldGEPICmp() 669 (isa<ConstantExpr>(GEPRHS) || GEPRHS->hasOneUse())) { in FoldGEPICmp() 974 if (Shr->hasOneUse() && Shr->isExact()) in FoldICmpShrCst() 977 if (Shr->hasOneUse()) { in FoldICmpShrCst() 999 if (ICI.isEquality() && LHSI->hasOneUse()) { in visitICmpInstWithInstAndIntCst() 1049 if (LHSI->hasOneUse()) { in visitICmpInstWithInstAndIntCst() 1076 if (LHSI->hasOneUse() && isa<ConstantInt>(LHSI->getOperand(1)) && in visitICmpInstWithInstAndIntCst() 1077 LHSI->getOperand(0)->hasOneUse()) { in visitICmpInstWithInstAndIntCst() 1183 if (Shift && Shift->hasOneUse() && RHSV == 0 && in visitICmpInstWithInstAndIntCst() 1219 if (!ICI.isEquality() || !RHS->isNullValue() || !LHSI->hasOneUse()) in visitICmpInstWithInstAndIntCst() [all …]
|
D | InstCombineShifts.cpp | 44 if (Op1->hasOneUse() && match(Op1, m_SRem(m_Value(A), m_Power2(B)))) { in commonShiftTransforms() 104 if (!I->hasOneUse()) return false; in CanEvaluateShifted() 402 if (Op0->hasOneUse()) { in FoldShiftByConstant() 415 if (isLeftShift && Op0BO->getOperand(1)->hasOneUse() && in FoldShiftByConstant() 430 if (isLeftShift && Op0BOOp1->hasOneUse() && in FoldShiftByConstant() 434 cast<BinaryOperator>(Op0BOOp1)->getOperand(0)->hasOneUse()) { in FoldShiftByConstant() 448 if (isLeftShift && Op0BO->getOperand(0)->hasOneUse() && in FoldShiftByConstant() 462 if (isLeftShift && Op0BO->getOperand(0)->hasOneUse() && in FoldShiftByConstant() 467 ->getOperand(0)->hasOneUse()) { in FoldShiftByConstant()
|
D | InstCombinePHI.cpp | 46 if (!I || I->getOpcode() != Opc || !I->hasOneUse() || in FoldPHIArgBinOpIntoPHI() 149 if (!GEP || !GEP->hasOneUse() || GEP->getType() != FirstInst->getType() || in FoldPHIArgGEPIntoPHI() 320 if (!LI || !LI->hasOneUse()) in FoldPHIArgLoadIntoPHI() 437 if (I == 0 || !I->hasOneUse() || !I->isSameOperationAs(FirstInst)) in FoldPHIArgOpIntoPHI() 511 if (!PN->hasOneUse()) return false; in DeadPHICycle() 674 !User->hasOneUse() || !isa<TruncInst>(User->use_back()) || in SliceUpIllegalIntegerPHI() 806 PN.getIncomingValue(0)->hasOneUse()) in visitPHINode() 813 if (PN.hasOneUse()) { in visitPHINode() 828 if (PHIUser->hasOneUse() && in visitPHINode()
|
D | InstructionCombining.cpp | 284 Op0->hasOneUse() && Op1->hasOneUse()) { in SimplifyAssociativeOrCommutative() 395 if (!V && Op0->hasOneUse() && Op1->hasOneUse()) in SimplifyUsingDistributiveLaws() 417 if (!V && Op0->hasOneUse() && Op1->hasOneUse()) in SimplifyUsingDistributiveLaws() 557 if (!SI->hasOneUse()) return 0; in FoldOpIntoSelect() 601 if (!PN->hasOneUse()) { in FoldOpIntoPhi() 794 !Src.hasOneUse()) in shouldMergeGEPs() 1201 BI.getCondition()->hasOneUse()) in visitBranchInst() 1217 BI.getCondition()->hasOneUse()) in visitBranchInst() 1336 if (II->hasOneUse()) { in visitExtractValueInst() 1386 if (L->isSimple() && L->hasOneUse()) { in visitExtractValueInst() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Transforms/Scalar/ |
D | Reassociate.cpp | 204 if ((V->hasOneUse() || V->use_empty()) && isa<Instruction>(V) && in isReassociableOp() 284 if (!LHSBO && LHS->hasOneUse() && BinaryOperator::isNeg(LHS)) { in LinearizeExprTree() 288 if (!RHSBO && RHS->hasOneUse() && BinaryOperator::isNeg(RHS)) { in LinearizeExprTree() 416 if (I->getOpcode() == Instruction::Add && I->hasOneUse()) { in NegateValue() 483 if (Sub->hasOneUse() && in ShouldBreakUpSubtract() 525 (Shl->hasOneUse() && in ConvertShiftToMul() 634 if (!(V->hasOneUse() || V->use_empty()) || // More than one use. in FindSingleUseMultiplyFactors() 1008 (!BI->hasOneUse() || in ReassociateInst() 1022 if (I->hasOneUse() && isReassociableOp(I->use_back(), I->getOpcode())) in ReassociateInst() 1027 if (I->hasOneUse() && I->getOpcode() == Instruction::Add && in ReassociateInst() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | Reassociate.cpp | 129 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 …]
|
D | MergedLoadStoreMotion.cpp | 303 A0->hasOneUse() && (A0->getParent() == L0->getParent()) && in hoistLoad() 304 A1->hasOneUse() && (A1->getParent() == L1->getParent()) && in hoistLoad() 428 if (A0 && A1 && A0->isIdenticalTo(A1) && A0->hasOneUse() && in sinkStore() 429 (A0->getParent() == S0->getParent()) && A1->hasOneUse() && in sinkStore()
|
/external/swiftshader/third_party/LLVM/lib/CodeGen/SelectionDAG/ |
D | DAGCombiner.cpp | 374 if (!Op.hasOneUse()) return 0; in isNegatibleForFree() 426 assert(Op.hasOneUse() && "Unknown reuse!"); in GetNegatedExpression() 526 if (isSetCCEquivalent(N, N0, N1, N2) && N.getNode()->hasOneUse()) in isOneUseSetCC() 543 if (N0.hasOneUse()) { in ReassociateOps() 561 if (N1.hasOneUse()) { in ReassociateOps() 633 if (TLO.Old.getNode()->getOperand(i).getNode()->hasOneUse()) in CommitTargetLoweringOpt() 1235 if (Op.hasOneUse() && in visitTokenFactor() 1301 if (N01C && N00.getOpcode() == ISD::ADD && N00.getNode()->hasOneUse() && in combineShlAddConstant() 1426 if (N0.getOpcode() == ISD::SHL && N0.getNode()->hasOneUse()) { in visitADD() 1430 if (N1.getOpcode() == ISD::SHL && N1.getNode()->hasOneUse()) { in visitADD() [all …]
|
/external/llvm/lib/CodeGen/SelectionDAG/ |
D | DAGCombiner.cpp | 577 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/lib/Target/X86/ |
D | X86ISelDAGToDAG.cpp | 300 if (!N.hasOneUse()) in IsProfitableToFold() 399 if (Callee.getNode() == Chain.getNode() || !Callee.hasOneUse()) in isCalleeLoad() 410 if (!Chain.hasOneUse()) in isCalleeLoad() 421 Callee.getValue(1).hasOneUse()) in isCalleeLoad() 840 if (MulVal.getNode()->getOpcode() == ISD::ADD && MulVal.hasOneUse() && in MatchAddressRecursively() 887 if (!RHS.getNode()->hasOneUse() || in MatchAddressRecursively() 898 !AM.Base_Reg.getNode()->hasOneUse()) || in MatchAddressRecursively() 998 if (Shift.getOpcode() == ISD::SRL && Shift.hasOneUse()) { in MatchAddressRecursively() 1057 if (!N.hasOneUse() || !Shift.hasOneUse()) in MatchAddressRecursively() 1185 PatternNodeWithChain.hasOneUse() && in SelectScalarSSELoad() [all …]
|
/external/llvm/lib/Target/X86/ |
D | X86ISelDAGToDAG.cpp | 403 if (!N.hasOneUse()) in IsProfitableToFold() 504 if (Callee.getNode() == Chain.getNode() || !Callee.hasOneUse()) in isCalleeLoad() 515 if (!Chain.hasOneUse()) in isCalleeLoad() 531 Callee.getValue(1).hasOneUse()) in isCalleeLoad() 924 !Shift.hasOneUse()) in foldMaskAndShiftToExtract() 972 if (!N.hasOneUse() || !Shift.hasOneUse()) in foldMaskedShiftToScaledMask() 1032 if (Shift.getOpcode() != ISD::SRL || !Shift.hasOneUse() || in foldMaskAndShiftToScale() 1258 if (MulVal.getNode()->getOpcode() == ISD::ADD && MulVal.hasOneUse() && in matchAddressRecursively() 1305 if (!RHS.getNode()->hasOneUse() || in matchAddressRecursively() 1316 !AM.Base_Reg.getNode()->hasOneUse()) || in matchAddressRecursively() [all …]
|