Home
last modified time | relevance | path

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

12345678

/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineSelect.cpp174 if (!Cmp->hasOneUse()) in foldSelectICmpAnd()
308 (!TI->hasOneUse() || !FI->hasOneUse())) in foldSelectOpOp()
310 } else if (!TI->hasOneUse() || !FI->hasOneUse()) { in foldSelectOpOp()
365 if (TI->hasOneUse() || FI->hasOneUse()) { in foldSelectOpOp()
451 !TI->hasOneUse() || !FI->hasOneUse()) in foldSelectOpOp()
518 if (!TVI || !TVI->hasOneUse() || isa<Constant>(FalseVal)) in foldSelectIntoOp()
589 if (!(Cmp->hasOneUse() && Cmp->getOperand(0)->hasOneUse() && in foldSelectICmpAndAnd()
792 (IC->hasOneUse() + BinOp->hasOneUse())) in foldSelectICmpAndBinOp()
959 if (IsNegative && !TrueVal->hasOneUse() && !ICI->hasOneUse()) in canonicalizeSaturatedSubtract()
972 if (!Cmp->hasOneUse()) in canonicalizeSaturatedAdd()
[all …]
H A DInstCombineAndOrXor.cpp1087 (ZeroICmp->hasOneUse() || UnsignedICmp->hasOneUse())) { in foldUnsignedUnderflowCheck()
1150 if (!Cmp0->hasOneUse() || !Cmp1->hasOneUse()) in foldEqOfParts()
1254 if (!Cmp1->hasOneUse()) in foldAndOrOfICmpsWithConstEq()
1307 if (!(ICmp1->hasOneUse() && ICmp2->hasOneUse()) || CR1.isWrappedSet() || in foldAndOrOfICmpsUsingRanges()
1449 if (LHS->hasOneUse() && RHS->hasOneUse()) { in foldLogicOfFCmps()
1472 if (LHS0 == RHS0 && LHS->hasOneUse() && RHS->hasOneUse() && in foldLogicOfFCmps()
1511 if (!FCmp || !FCmp->hasOneUse()) in matchIsFPClassLikeFCmp()
1669 !IC.isFreeToInvert(A, A->hasOneUse()) && in matchDeMorgansLaws()
1670 !IC.isFreeToInvert(B, B->hasOneUse())) { in matchDeMorgansLaws()
1831 if ((Cast0->hasOneUse() || Cast1->hasOneUse()) && in foldCastedBitwiseLogic()
[all …]
H A DInstructionCombining.cpp205 if (Inst && !GEP->hasOneUse() && !GEP->hasAllConstantIndices() && in EmitGEPOffset()
338 if (!Cast || !Cast->hasOneUse()) in simplifyAssocCastAssoc()
352 if (!BinOp2 || !BinOp2->hasOneUse() || BinOp2->getOpcode() != AssocOpcode) in simplifyAssocCastAssoc()
693 if (!V && (LHS->hasOneUse() || RHS->hasOneUse())) in tryFactorization()
713 if (!V && (LHS->hasOneUse() || RHS->hasOneUse())) in tryFactorization()
822 if (!isFreeToInvert(Op, Op->hasOneUse(), Consumes) || !Consumes) in tryFoldInstWithCtpopWithNot()
824 Value *NotOp = getFreelyInverted(Op, Op->hasOneUse(), &Builder); in tryFoldInstWithCtpopWithNot()
1329 if (LHS->hasOneUse() && RHS->hasOneUse()) { in SimplifySelectsFeedingBinaryOp()
1335 } else if (LHSIsSelect && LHS->hasOneUse()) { in SimplifySelectsFeedingBinaryOp()
1342 } else if (RHSIsSelect && RHS->hasOneUse()) { in SimplifySelectsFeedingBinaryOp()
[all …]
H A DInstCombineCompares.cpp753 (GEPLHS->hasAllConstantIndices() || GEPLHS->hasOneUse()) && in foldGEPICmp()
754 (GEPRHS->hasAllConstantIndices() || GEPRHS->hasOneUse()) && in foldGEPICmp()
1076 if (!AddWithCst->hasOneUse()) in processUGT_ADDCST_ADD()
1375 if (Cmp.hasOneUse() && in foldICmpWithDominatingICmp()
1452 if (Cmp.isEquality() && Trunc->hasOneUse()) { in foldICmpTruncConstant()
1518 (!Cmp.getOperand(0)->hasOneUse() || !Cmp.getOperand(1)->hasOneUse())) in foldICmpTruncWithTruncOrExt()
1588 if (Xor->hasOneUse()) { in foldICmpXorConstant()
1727 if (Shift->hasOneUse() && C1.isZero() && Cmp.isEquality() && in foldICmpAndShift()
1761 if (!And->hasOneUse()) in foldICmpAndConstConst()
1819 if (!Cmp.isSigned() && C1.isZero() && And->getOperand(0)->hasOneUse() && in foldICmpAndConstConst()
[all …]
H A DInstCombineVectorOps.cpp127 if (!PHIUser->hasOneUse() || !(PHIUser->user_back() == PN) || in scalarizePHI()
210 Ext.getVectorOperand()->hasOneUse())) { in foldBitcastExtElt()
260 if (X->hasOneUse() && Ext.getVectorOperand()->hasOneUse()) { in foldBitcastExtElt()
296 if (!X->hasOneUse() || !Ext.getVectorOperand()->hasOneUse()) in foldBitcastExtElt()
307 if (!Ext.getVectorOperand()->hasOneUse()) in foldBitcastExtElt()
511 if (IndexC && IdxVal < EC.getKnownMinValue() && GEP->hasOneUse()) { in visitExtractElementInst()
571 if (CI->hasOneUse() && (CI->getOpcode() != Instruction::BitCast)) { in visitExtractElementInst()
590 if (SrcVec->hasOneUse()) { in visitExtractElementInst()
740 if (InsElt->hasOneUse() && isa<InsertElementInst>(InsElt->user_back())) in replaceExtractElements()
1163 while (V->hasOneUse() && Depth < 10) { in visitInsertValueInst()
[all …]
H A DInstCombineAddSub.cpp471 InstQuota = ((!isa<Constant>(V0) && V0->hasOneUse()) && in simplify()
472 (!isa<Constant>(V1) && V1->hasOneUse())) ? 2 : 1; in simplify()
758 if (!LHS->hasOneUse() && !RHS->hasOneUse()) in checkForNegativeOperand()
829 if (Op0->hasOneUse()) in foldNoWrapAdd()
961 if (Op0->hasOneUse() && *C2 == -(*C)) { in foldAddWithConstant()
977 if (C->isOne() && Op0->hasOneUse()) { in foldAddWithConstant()
1180 if (!LHS->hasOneUse() || !MatchMul(LHS, Div, C1)) in SimplifyAddWithRemainder()
1182 if (!RHS->hasOneUse() || !MatchMul(RHS, Rem, C2)) in SimplifyAddWithRemainder()
1193 if (!NewC.isZero() && !Rem->hasOneUse()) in SimplifyAddWithRemainder()
1419 if (!Op0 || !Op1 || !(Op0->hasOneUse() || Op1->hasOneUse())) in factorizeMathWithShlOps()
[all …]
H A DInstCombineShifts.cpp203 !Trunc->hasOneUse()) in dropRedundantMaskingOfLeftShiftInput()
320 if (!Masked->hasOneUse()) in dropRedundantMaskingOfLeftShiftInput()
356 !BinInst->hasOneUse()) in foldShiftOfShiftedBinOp()
379 (V->hasOneUse() || match(W, m_ImmConstant())) && in foldShiftOfShiftedBinOp()
499 if (Op1->hasOneUse() && match(Op1, m_SRem(m_Value(A), m_Constant(C))) && in commonShiftTransforms()
582 if (!I->hasOneUse()) return false; in canEvaluateShifted()
828 if (!Op0->hasOneUse()) in FoldShiftByConstant()
933 if (!Add->hasOneUse()) { in foldLShrOverflowBit()
956 if (!Add->hasOneUse()) { in foldLShrOverflowBit()
1161 if (Op0BO->isCommutative() && Y->hasOneUse() && in visitShl()
[all …]
H A DInstCombineCasts.cpp169 if (CSrc->hasOneUse()) in commonCastTransforms()
250 if (!V->hasOneUse()) in canNotEvaluateInType()
405 if (!TruncOp->hasOneUse() || !isa<IntegerType>(DestType)) in foldVecTruncToExtElt()
633 if (Shuf && Shuf->hasOneUse() && match(Shuf->getOperand(1), m_Undef()) && in shrinkSplatShuffle()
657 if (!InsElt || !InsElt->hasOneUse()) in shrinkInsertElt()
813 if (Src->hasOneUse()) { in visitTrunc()
831 if (Src->hasOneUse() && in visitTrunc()
993 if (Cmp->hasOneUse() && match(Cmp->getOperand(1), m_ZeroInt()) && in transformZExtICmp()
1141 if (Zext.hasOneUse() && isa<TruncInst>(Zext.user_back()) && in visitZExt()
1173 if (SrcOp->hasOneUse()) in visitZExt()
[all …]
H A DInstCombineMulDivRem.cpp51 if (!V->hasOneUse()) return nullptr; in simplifyValueKnownNonZero()
264 if (Op0->hasOneUse() && match(Op1, m_NegatedPower2())) { in visitMul()
372 if (Op0->hasOneUse()) { in visitMul()
405 if (Div && Div->hasOneUse() && in visitMul()
452 (Op0->hasOneUse() || Op1->hasOneUse() || X == Y)) { in visitMul()
462 (Op0->hasOneUse() || Op1->hasOneUse())) { in visitMul()
592 (Op0->hasOneUse() || Op1->hasOneUse())) { in foldFPSignBitOps()
710 if (C1DivC && Op0->hasOneUse() && C1DivC->isNormalFP()) in foldFMulReassoc()
1012 if (SI->use_empty() && SelectCond->hasOneUse()) in simplifyDivRemOfSelectWithZeroOp()
1107 if (IsSigned && HasNSW && (Op0->hasOneUse() || Op1->hasOneUse())) { in foldIDivShl()
[all …]
H A DInstCombineCalls.cpp108 if (!Src->hasOneUse()) in hasUndefSource()
112 return isa<AllocaInst>(Src) && Src->hasOneUse(); in hasUndefSource()
508 if (II.hasOneUse() && match(Op1, m_Zero()) && in foldCttzCtlz()
651 if (Op0->hasOneUse() && in foldCtpop()
1154 if (!MinMax2->hasOneUse() || !AddSub->hasOneUse()) in matchSAddSubSat()
1192 if (!match(I1, m_APInt(C1)) || !I0->hasOneUse()) in foldClampRangeOfTwo()
1296 (!LHS->hasOneUse() && !RHS->hasOneUse())) in factorizeMinMaxTree()
1307 if (LHS->hasOneUse()) { in factorizeMinMaxTree()
1322 assert(RHS->hasOneUse() && "Expected one-use operand"); in factorizeMinMaxTree()
1373 if (none_of(II->args(), [](Value *V) { return V->hasOneUse(); })) in foldShuffledIntrinsicOperands()
[all …]
H A DInstCombineNegator.cpp153 if (!V->hasOneUse() && !IsTrulyNegation) in visitImpl()
226 if (auto *CI = dyn_cast<CmpIntrinsic>(I); CI && CI->hasOneUse()) in visitImpl()
235 (I->hasOneUse() || match(I->getOperand(0), m_ImmConstant()))) { in visitImpl()
246 if (!V->hasOneUse()) in visitImpl()
H A DInstCombineSimplifyDemanded.cpp117 if (VInst->hasOneUse()) { in SimplifyDemandedBits()
352 if (LHSInst->getOpcode() == Instruction::And && LHSInst->hasOneUse() && in SimplifyDemandedUseBits()
511 (I->getOperand(0)->hasOneUse() || I->getOperand(1)->hasOneUse())) { in SimplifyDemandedUseBits()
642 if (I->hasOneUse()) { in SimplifyDemandedUseBits()
724 if (I->hasOneUse()) { in SimplifyDemandedUseBits()
1356 if (!Shr->hasOneUse()) in simplifyShrShlDemandedBits()
1457 if (!V->hasOneUse()) { in SimplifyDemandedVectorElts()
1892 if (DemandedElts == 1 && !X->hasOneUse() && !Y->hasOneUse() && in SimplifyDemandedVectorElts()
1893 BO->hasOneUse() ) { in SimplifyDemandedVectorElts()
1981 if (!I->hasOneUse()) in SimplifyDemandedUseFPClass()
H A DInstCombinePHI.cpp109 if (!PN.hasOneUse()) in foldIntegerTypedPHI()
180 if (!LoadI->hasOneUse()) in foldIntegerTypedPHI()
266 (LoadI && LoadI->hasOneUse())) && in foldIntegerTypedPHI()
980 if (!PN->hasOneUse()) return false; in isDeadPHICycle()
1160 !UserI->hasOneUse() || !isa<TruncInst>(UserI->user_back()) || in SliceUpIllegalIntegerPHI()
1477 if (PN.hasOneUse()) { in visitPHINode()
1495 if (PHIUser->hasOneUse() && in visitPHINode()
1522 if (U->hasOneUse() && match(U, m_c_Or(m_Specific(&PN), m_Value()))) { in visitPHINode()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DGuardUtils.cpp76 if (!Cond->hasOneUse()) in parseWidenableBranch()
102 A->hasOneUse()) { in parseWidenableBranch()
109 B->hasOneUse()) { in parseWidenableBranch()
157 if (!Condition->hasOneUse())
164 if (isWidenableCondition(Check) && Check->hasOneUse()) {
/freebsd/contrib/llvm-project/llvm/lib/Target/RISCV/
H A DRISCVMergeBaseOffset.cpp107 if (!MRI->hasOneUse(HiDestReg)) in INITIALIZE_PASS()
191 if (!Reg.isVirtual() || !MRI->hasOneUse(Reg)) in foldLargeOffset()
217 !MRI->hasOneUse(OffsetLui.getOperand(0).getReg())) in foldLargeOffset()
272 if (!Rs1.isVirtual() || !MRI->hasOneUse(Rs1)) in foldShiftedOffset()
309 if (!MRI->hasOneUse(DestReg)) in detectAndFoldOffset()
325 if (MRI->hasOneUse(TailDestReg)) { in detectAndFoldOffset()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DRelLookupTableConverter.cpp33 !GV.hasOneUse()) in shouldConvertToRelLookupTable()
38 if (!GEP || !GEP->hasOneUse() || in shouldConvertToRelLookupTable()
43 if (!Load || !Load->hasOneUse() || in shouldConvertToRelLookupTable()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DDAGCombiner.cpp947 if (Op->hasOneUse() || Op->getNumValues() > 1) in deleteAndRecombine()
1004 if (isSetCCEquivalent(N, N0, N1, N2) && N->hasOneUse()) in isOneUseSetCC()
1135 if (N0.hasOneUse()) in reassociationCanBreakAddressingModePattern()
1318 N0->hasOneUse() && N1->hasOneUse() && in reassociateReduction()
1538 Replace0 &= !N0->hasOneUse(); in PromoteIntBinOp()
1539 Replace1 &= (N0 != N1) && !N1->hasOneUse(); in PromoteIntBinOp()
2106 if (N->hasOneUse() && N->use_begin()->getOpcode() == ISD::TokenFactor) in visitTokenFactor()
2143 if (Op.hasOneUse() && !is_contained(TFs, Op.getNode())) { in visitTokenFactor()
2393 if (N1.getOpcode() != ISD::VSELECT || !N1.hasOneUse()) in foldSelectWithIdentityConstant()
2446 if (Sel.getOpcode() != ISD::SELECT || !Sel.hasOneUse()) { in foldBinOpIntoSelect()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DReassociate.cpp165 if (BO && BO->hasOneUse() && BO->getOpcode() == Opcode) in isReassociableOp()
174 if (BO && BO->hasOneUse() && in isReassociableOp()
456 if (!Op->hasOneUse()) { in LinearizeExprTree()
477 if (!Op->hasOneUse()) in LinearizeExprTree()
494 assert(Op->hasOneUse() && "Has uses outside the expression tree!"); in LinearizeExprTree()
952 if (Or->hasOneUse() && isInteresting(VB)) in shouldConvertOrWithNoCommonBitsToAdd()
997 if (Sub->hasOneUse() && in ShouldBreakUpSubtract()
1270 if (!Opnd1->getValue()->hasOneUse()) in CombineXorOpnd()
1304 if (Opnd1->getValue()->hasOneUse()) in CombineXorOpnd()
1306 if (Opnd2->getValue()->hasOneUse()) in CombineXorOpnd()
[all …]
H A DMergedLoadStoreMotion.cpp236 return GEP0 && GEP1 && GEP0->isIdenticalTo(GEP1) && GEP0->hasOneUse() && in canSinkStoresAndGEPs()
237 (GEP0->getParent() == S0->getParent()) && GEP1->hasOneUse() && in canSinkStoresAndGEPs()
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/
H A DX86PartialReduction.cpp140 if (!isa<Constant>(LHS) && !LHS->hasOneUse()) in tryMAddReplacement()
142 if (!isa<Constant>(RHS) && !RHS->hasOneUse()) in tryMAddReplacement()
363 if (!BO || BO->getOpcode() != Instruction::Add || !BO->hasOneUse()) in matchAddReduction()
418 if (!Phi->hasOneUse()) in isReachableFromPHI()
425 while (U->hasOneUse() && U->getOpcode() == BO->getOpcode()) in isReachableFromPHI()
H A DX86ISelDAGToDAG.cpp639 if (!N.hasOneUse()) in IsProfitableToFold()
795 return N->getOperand(1).hasOneUse(); in isProfitableToFormMaskedOp()
840 if (Callee.getNode() == Chain.getNode() || !Callee.hasOneUse()) in isCalleeLoad()
851 if (!Chain.hasOneUse()) in isCalleeLoad()
867 Callee.getValue(1).hasOneUse()) in isCalleeLoad()
973 !N->getOperand(1).hasOneUse(); in PreprocessISelDAG()
2047 !Shift.hasOneUse()) in foldMaskAndShiftToExtract()
2101 if (Shift.getOpcode() == ISD::ANY_EXTEND && Shift.hasOneUse() && in foldMaskedShiftToScaledMask()
2117 if (!N.hasOneUse() || !Shift.hasOneUse()) in foldMaskedShiftToScaledMask()
2184 if (Shift.getOpcode() != ISD::SRL || !Shift.hasOneUse() || in foldMaskAndShiftToScale()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/SystemZ/
H A DSystemZTargetTransformInfo.cpp491 if (I->hasOneUse() && in getArithmeticInstrCost()
504 if ((I->hasOneUse() && I->getOpcode() == Instruction::Xor) && in getArithmeticInstrCost()
824 if (Ld->hasOneUse()) in getCastInstrCost()
832 if (Ld->hasOneUse()) in getCastInstrCost()
979 if (!Ld->hasOneUse() && Ld->getParent() == I->getParent() && in getCmpSelInstrCost()
1072 if (!Ld->hasOneUse()) in isFoldableLoad()
1080 if (UserI->hasOneUse()) { in isFoldableLoad()
1213 if (Opcode == Instruction::Load && I->hasOneUse()) { in getMemoryOpCost()
1217 (!LdUser->hasOneUse() || !isa<StoreInst>(*LdUser->user_begin()))) in getMemoryOpCost()
1222 if (StoredVal->hasOneUse() && isBswapIntrinsicCall(StoredVal)) in getMemoryOpCost()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DInterleavedAccessPass.cpp462 if (!SVI || !SVI->hasOneUse() || isa<ScalableVectorType>(SVI->getType())) in lowerInterleavedStore()
486 if (!LI || !LI->hasOneUse() || !LI->isSimple()) in lowerDeinterleaveIntrinsic()
503 if (!II->hasOneUse()) in lowerInterleaveIntrinsic()
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPULowerKernelAttributes.cpp109 if (!U->hasOneUse()) in processUse()
123 if (!BCI->hasOneUse()) in processUse()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVectorCombine.cpp154 if (!Load || !Load->isSimple() || !Load->hasOneUse() || in canWidenLoad()
176 !Scalar->hasOneUse()) in vectorizeLoadInsert()
458 : !Ext0->hasOneUse() || !Ext1->hasOneUse(); in isExtractExtractCheap()
466 !Ext0->hasOneUse() * Extract0Cost + in isExtractExtractCheap()
467 !Ext1->hasOneUse() * Extract1Cost; in isExtractExtractCheap()
601 if (I.hasOneUse()) in foldExtractExtract()
676 if (Extract->hasOneUse()) in foldInsExtFNeg()
864 (SplatCost * !Op0->hasOneUse()) + (SplatCost * !Op1->hasOneUse()); in scalarizeVPIntrinsic()
988 (IsConst0 ? 0 : !Ins0->hasOneUse() * InsertCost) + in scalarizeBinopOrCmp()
989 (IsConst1 ? 0 : !Ins1->hasOneUse() * InsertCost); in scalarizeBinopOrCmp()
[all …]

12345678