Home
last modified time | relevance | path

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

12345678

/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineAndOrXor.cpp1122 (ZeroICmp->hasOneUse() || UnsignedICmp->hasOneUse())) { in foldUnsignedUnderflowCheck()
1184 if (!Cmp0->hasOneUse() || !Cmp1->hasOneUse()) in foldEqOfParts()
1302 if (!Cmp1->hasOneUse()) in foldAndOrOfICmpsWithConstEq()
1355 if (!(ICmp1->hasOneUse() && ICmp2->hasOneUse()) || CR1.isWrappedSet() || in foldAndOrOfICmpsUsingRanges()
1493 if (LHS->hasOneUse() && RHS->hasOneUse()) { in foldLogicOfFCmps()
1516 if (LHS0 == RHS0 && LHS->hasOneUse() && RHS->hasOneUse() && in foldLogicOfFCmps()
1556 if (!FCmp || !FCmp->hasOneUse()) in matchIsFPClassLikeFCmp()
1710 !IC.isFreeToInvert(A, A->hasOneUse()) && in matchDeMorgansLaws()
1711 !IC.isFreeToInvert(B, B->hasOneUse())) { in matchDeMorgansLaws()
1846 if (!Cast0->hasOneUse() && !Cast1->hasOneUse()) in foldCastedBitwiseLogic()
[all …]
H A DInstCombineSelect.cpp143 if (CreateAnd && !CondVal->hasOneUse()) in foldSelectICmpAnd()
184 1 + CondVal->hasOneUse()) in foldSelectICmpAnd()
281 (!TI->hasOneUse() || !FI->hasOneUse())) in foldSelectOpOp()
283 } else if (!TI->hasOneUse() || !FI->hasOneUse()) { in foldSelectOpOp()
338 if (TI->hasOneUse() || FI->hasOneUse()) { in foldSelectOpOp()
436 !TI->hasOneUse() || !FI->hasOneUse()) in foldSelectOpOp()
503 if (!TVI || !TVI->hasOneUse() || isa<Constant>(FalseVal)) in foldSelectIntoOp()
635 if (!(Cmp->hasOneUse() && Cmp->getOperand(0)->hasOneUse() && in foldSelectICmpAndAnd()
813 (CondVal->hasOneUse() + BinOp->hasOneUse())) in foldSelectICmpAndBinOp()
981 if (IsNegative && !TrueVal->hasOneUse() && !ICI->hasOneUse()) in canonicalizeSaturatedSubtract()
[all …]
H A DInstructionCombining.cpp367 if (!Cast || !Cast->hasOneUse()) in simplifyAssocCastAssoc()
381 if (!BinOp2 || !BinOp2->hasOneUse() || BinOp2->getOpcode() != AssocOpcode) in simplifyAssocCastAssoc()
722 if (!V && (LHS->hasOneUse() || RHS->hasOneUse())) in tryFactorization()
742 if (!V && (LHS->hasOneUse() || RHS->hasOneUse())) in tryFactorization()
851 if (!isFreeToInvert(Op, Op->hasOneUse(), Consumes) || !Consumes) in tryFoldInstWithCtpopWithNot()
853 Value *NotOp = getFreelyInverted(Op, Op->hasOneUse(), &Builder); in tryFoldInstWithCtpopWithNot()
1357 if (LHS->hasOneUse() && RHS->hasOneUse()) { in SimplifySelectsFeedingBinaryOp()
1363 } else if (LHSIsSelect && LHS->hasOneUse()) { in SimplifySelectsFeedingBinaryOp()
1370 } else if (RHSIsSelect && RHS->hasOneUse()) { in SimplifySelectsFeedingBinaryOp()
1731 if (!SI->hasOneUse() && !FoldWithMultiUse) in FoldOpIntoSelect()
[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()
583 if (CI->hasOneUse() && (CI->getOpcode() != Instruction::BitCast)) { in visitExtractElementInst()
602 if (SrcVec->hasOneUse()) { in visitExtractElementInst()
752 if (InsElt->hasOneUse() && isa<InsertElementInst>(InsElt->user_back())) in replaceExtractElements()
1241 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()
1186 if (!LHS->hasOneUse() || !MatchMul(LHS, Div, C1)) in SimplifyAddWithRemainder()
1188 if (!RHS->hasOneUse() || !MatchMul(RHS, Rem, C2)) in SimplifyAddWithRemainder()
1201 if (!NewC.isZero() && !Rem->hasOneUse()) in SimplifyAddWithRemainder()
1454 if (!Op0 || !Op1 || !(Op0->hasOneUse() || Op1->hasOneUse())) in factorizeMathWithShlOps()
[all …]
H A DInstCombineCompares.cpp780 (GEPLHS->hasAllConstantIndices() || GEPLHS->hasOneUse()) && in foldGEPICmp()
781 (GEPRHS->hasAllConstantIndices() || GEPRHS->hasOneUse()) && in foldGEPICmp()
1104 if (!AddWithCst->hasOneUse()) in processUGT_ADDCST_ADD()
1411 if (Cmp.hasOneUse() && in foldICmpWithDominatingICmp()
1488 if (Cmp.isEquality() && Trunc->hasOneUse()) { in foldICmpTruncConstant()
1554 (!Cmp.getOperand(0)->hasOneUse() || !Cmp.getOperand(1)->hasOneUse())) in foldICmpTruncWithTruncOrExt()
1624 if (Xor->hasOneUse()) { in foldICmpXorConstant()
1763 if (Shift->hasOneUse() && C1.isZero() && Cmp.isEquality() && in foldICmpAndShift()
1809 if (!And->hasOneUse()) in foldICmpAndConstConst()
1867 if (!Cmp.isSigned() && C1.isZero() && And->getOperand(0)->hasOneUse() && in foldICmpAndConstConst()
[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()
500 if (Op1->hasOneUse() && match(Op1, m_SRem(m_Value(A), m_Constant(C))) && in commonShiftTransforms()
598 if (!I->hasOneUse()) return false; in canEvaluateShifted()
844 if (!Op0->hasOneUse()) in FoldShiftByConstant()
949 if (!Add->hasOneUse()) { in foldLShrOverflowBit()
972 if (!Add->hasOneUse()) { in foldLShrOverflowBit()
1183 if (Op0BO->isCommutative() && Y->hasOneUse() && in visitShl()
[all …]
H A DInstCombineCasts.cpp171 if (CSrc->hasOneUse()) in commonCastTransforms()
252 if (!V->hasOneUse()) in canNotEvaluateInType()
415 if (!TruncOp->hasOneUse() || !isa<IntegerType>(DestType)) in foldVecTruncToExtElt()
709 if (Shuf && Shuf->hasOneUse() && match(Shuf->getOperand(1), m_Undef()) && in shrinkSplatShuffle()
733 if (!InsElt || !InsElt->hasOneUse()) in shrinkInsertElt()
886 if (Src->hasOneUse()) { in visitTrunc()
904 if (Src->hasOneUse() && in visitTrunc()
1040 if (Cmp->hasOneUse() && match(Cmp->getOperand(1), m_ZeroInt()) && in transformZExtICmp()
1046 Cmp->getPredicate() != ICmpInst::ICMP_EQ || Shift->hasOneUse()) { in transformZExtICmp()
1195 if (Zext.hasOneUse() && isa<TruncInst>(Zext.user_back()) && in visitZExt()
[all …]
H A DInstCombineMulDivRem.cpp52 if (!V->hasOneUse()) return nullptr; in simplifyValueKnownNonZero()
271 if (HasNUW && OpBO->getOpcode() == Instruction::AShr && OpBO->hasOneUse()) in visitMul()
285 if (Op0->hasOneUse() && match(Op1, m_NegatedPower2())) { in visitMul()
393 if (Op0->hasOneUse()) { in visitMul()
426 if (Div && Div->hasOneUse() && in visitMul()
473 (Op0->hasOneUse() || Op1->hasOneUse() || X == Y)) { in visitMul()
483 (Op0->hasOneUse() || Op1->hasOneUse())) { in visitMul()
607 (Op0->hasOneUse() || Op1->hasOneUse())) { in foldFPSignBitOps()
809 if (C1DivC && Op0->hasOneUse() && C1DivC->isNormalFP()) in foldFMulReassoc()
1120 if (SI->use_empty() && SelectCond->hasOneUse()) in simplifyDivRemOfSelectWithZeroOp()
[all …]
H A DInstCombineCalls.cpp109 if (!Src->hasOneUse()) in hasUndefSource()
113 return isa<AllocaInst>(Src) && Src->hasOneUse(); in hasUndefSource()
507 if (II.hasOneUse() && match(Op1, m_Zero()) && in foldCttzCtlz()
663 if (Op0->hasOneUse() && in foldCtpop()
1209 if (!MinMax2->hasOneUse() || !AddSub->hasOneUse()) in matchSAddSubSat()
1245 if (!match(I1, m_APInt(C1)) || !I0->hasOneUse()) in foldClampRangeOfTwo()
1349 (!LHS->hasOneUse() && !RHS->hasOneUse())) in factorizeMinMaxTree()
1360 if (LHS->hasOneUse()) { in factorizeMinMaxTree()
1375 assert(RHS->hasOneUse() && "Expected one-use operand"); in factorizeMinMaxTree()
1422 return isa<ShuffleVectorInst>(V) && V->hasOneUse(); in foldShuffledIntrinsicOperands()
[all …]
H A DInstCombineNegator.cpp149 if (!V->hasOneUse() && !IsTrulyNegation) in visitImpl()
222 if (auto *CI = dyn_cast<CmpIntrinsic>(I); CI && CI->hasOneUse()) in visitImpl()
231 (I->hasOneUse() || match(I->getOperand(0), m_ImmConstant()))) { in visitImpl()
242 if (!V->hasOneUse()) in visitImpl()
H A DInstCombineSimplifyDemanded.cpp124 if (VInst->hasOneUse()) { in SimplifyDemandedBits()
359 if (LHSInst->getOpcode() == Instruction::And && LHSInst->hasOneUse() && in SimplifyDemandedUseBits()
517 (I->getOperand(0)->hasOneUse() || I->getOperand(1)->hasOneUse())) { in SimplifyDemandedUseBits()
657 if (I->hasOneUse()) { in SimplifyDemandedUseBits()
739 if (I->hasOneUse()) { in SimplifyDemandedUseBits()
1360 if (!Shr->hasOneUse()) in simplifyShrShlDemandedBits()
1461 if (!V->hasOneUse()) { in SimplifyDemandedVectorElts()
1891 if (DemandedElts == 1 && !X->hasOneUse() && !Y->hasOneUse() && in SimplifyDemandedVectorElts()
1892 BO->hasOneUse() ) { in SimplifyDemandedVectorElts()
1993 if (!I->hasOneUse()) in SimplifyDemandedUseFPClass()
/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/LoongArch/
H A DLoongArchMergeBaseOffset.cpp120 if (!MRI->hasOneUse(HiDestReg)) in INITIALIZE_PASS()
142 if (!MRI->hasOneUse(Hi12->getOperand(0).getReg())) in INITIALIZE_PASS()
151 if (!MRI->hasOneUse(Lo20->getOperand(0).getReg())) in INITIALIZE_PASS()
155 if (!MRI->hasOneUse(Lo12->getOperand(0).getReg())) in INITIALIZE_PASS()
210 if (!MRI->hasOneUse(HiDestReg)) in detectFoldable()
228 if (!MRI->hasOneUse(AddDestReg)) in detectFoldable()
353 if (!Reg.isVirtual() || !MRI->hasOneUse(Reg)) in foldLargeOffset()
431 if (!MRI->hasOneUse(DestReg)) in detectAndFoldOffset()
454 if (MRI->hasOneUse(TailDestReg)) { in detectAndFoldOffset()
/freebsd/contrib/llvm-project/llvm/lib/Target/RISCV/
H A DRISCVMergeBaseOffset.cpp106 if (!MRI->hasOneUse(HiDestReg)) in INITIALIZE_PASS()
203 if (!Reg.isVirtual() || !MRI->hasOneUse(Reg)) in foldLargeOffset()
230 !MRI->hasOneUse(OffsetLui.getOperand(0).getReg())) in foldLargeOffset()
287 if (!Rs1.isVirtual() || !MRI->hasOneUse(Rs1)) in foldShiftedOffset()
325 if (!MRI->hasOneUse(DestReg)) in detectAndFoldOffset()
341 if (MRI->hasOneUse(TailDestReg)) { in detectAndFoldOffset()
H A DRISCVCodeGenPrepare.cpp149 if (!Phi || !Phi->hasOneUse() || Phi->getNumIncomingValues() != 2 || in widenVPMerge()
221 if (!PHI || !PHI->hasOneUse() || in visitIntrinsicInst()
H A DRISCVVectorPeephole.cpp159 if (!MRI->hasOneUse(SrcReg)) in tryToReduceVL()
452 !MRI->hasOneUse(MI.getOperand(3).getReg()) || in convertSameMaskVMergeToVMv()
604 MRI->hasOneUse(MI.getOperand(2).getReg()) && in foldUndefPassthruVMV_V_V()
642 if (!MRI->hasOneUse(MI.getOperand(2).getReg())) in foldVMV_V_V()
724 if (!TrueReg.isVirtual() || !MRI->hasOneUse(TrueReg)) in foldVMergeToMask()
/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.cpp967 if (Op->hasOneUse() || Op->getNumValues() > 1) in deleteAndRecombine()
1024 if (isSetCCEquivalent(N, N0, N1, N2) && N->hasOneUse()) in isOneUseSetCC()
1155 if (N0.hasOneUse()) in reassociationCanBreakAddressingModePattern()
1341 N0->hasOneUse() && N1->hasOneUse() && in reassociateReduction()
1595 Replace0 &= !N0->hasOneUse(); in PromoteIntBinOp()
1596 Replace1 &= (N0 != N1) && !N1->hasOneUse(); in PromoteIntBinOp()
2188 if (N->hasOneUse() && N->user_begin()->getOpcode() == ISD::TokenFactor) in visitTokenFactor()
2225 if (Op.hasOneUse() && !is_contained(TFs, Op.getNode())) { in visitTokenFactor()
2476 !N1.hasOneUse()) in foldSelectWithIdentityConstant()
2531 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()
945 if (Or->hasOneUse() && isInteresting(VB)) in shouldConvertOrWithNoCommonBitsToAdd()
990 if (Sub->hasOneUse() && in ShouldBreakUpSubtract()
1268 if (!Opnd1->getValue()->hasOneUse()) in CombineXorOpnd()
1302 if (Opnd1->getValue()->hasOneUse()) in CombineXorOpnd()
1304 if (Opnd2->getValue()->hasOneUse()) in CombineXorOpnd()
[all …]
H A DMergedLoadStoreMotion.cpp237 return GEP0 && GEP1 && GEP0->isIdenticalTo(GEP1) && GEP0->hasOneUse() && in canSinkStoresAndGEPs()
238 (GEP0->getParent() == S0->getParent()) && GEP1->hasOneUse() && in canSinkStoresAndGEPs()
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/
H A DX86PartialReduction.cpp138 if (!isa<Constant>(LHS) && !LHS->hasOneUse()) in tryMAddReplacement()
140 if (!isa<Constant>(RHS) && !RHS->hasOneUse()) in tryMAddReplacement()
360 if (!BO || BO->getOpcode() != Instruction::Add || !BO->hasOneUse()) in matchAddReduction()
415 if (!Phi->hasOneUse()) in isReachableFromPHI()
422 while (U->hasOneUse() && U->getOpcode() == BO->getOpcode()) in isReachableFromPHI()
H A DX86ISelDAGToDAG.cpp683 if (!N.hasOneUse()) in IsProfitableToFold()
839 return N->getOperand(1).hasOneUse(); in isProfitableToFormMaskedOp()
884 if (Callee.getNode() == Chain.getNode() || !Callee.hasOneUse()) in isCalleeLoad()
895 if (!Chain.hasOneUse()) in isCalleeLoad()
911 Callee.getValue(1).hasOneUse()) in isCalleeLoad()
1017 !N->getOperand(1).hasOneUse(); in PreprocessISelDAG()
2105 !Shift.hasOneUse()) in foldMaskAndShiftToExtract()
2159 if (Shift.getOpcode() == ISD::ANY_EXTEND && Shift.hasOneUse() && in foldMaskedShiftToScaledMask()
2175 if (!N.hasOneUse() || !Shift.hasOneUse()) in foldMaskedShiftToScaledMask()
2242 if (Shift.getOpcode() != ISD::SRL || !Shift.hasOneUse() || in foldMaskAndShiftToScale()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/SystemZ/
H A DSystemZTargetTransformInfo.cpp487 if (isa<LoadInst>(Op) && Op->hasOneUse()) { in isFreeEltLoad()
607 if (I->hasOneUse() && in getArithmeticInstrCost()
620 if ((I->hasOneUse() && I->getOpcode() == Instruction::Xor) && in getArithmeticInstrCost()
951 if (Ld->hasOneUse()) in getCastInstrCost()
959 if (Ld->hasOneUse()) in getCastInstrCost()
1106 if (!Ld->hasOneUse() && Ld->getParent() == I->getParent() && in getCmpSelInstrCost()
1217 if (!Ld->hasOneUse()) in isFoldableLoad()
1225 if (UserI->hasOneUse()) { in isFoldableLoad()
1358 if (Opcode == Instruction::Load && I->hasOneUse()) { in getMemoryOpCost()
1362 (!LdUser->hasOneUse() || !isa<StoreInst>(*LdUser->user_begin()))) in getMemoryOpCost()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPULowerKernelAttributes.cpp127 if (!U->hasOneUse()) in processUse()
141 if (!BCI->hasOneUse()) in processUse()

12345678