Home
last modified time | relevance | path

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

12345678

/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineAndOrXor.cpp70 if (!OldLHS->hasOneUse() && !OldRHS->hasOneUse()) in SimplifyBSwap()
1052 if (!Cmp0->hasOneUse() || !Cmp1->hasOneUse()) in foldEqOfParts()
1494 if (Op0->hasOneUse() || Op1->hasOneUse()) in foldAndToXor()
1512 if (Op0->hasOneUse() || Op1->hasOneUse()) in foldOrToXor()
1520 if (Op0->hasOneUse() || Op1->hasOneUse()) in foldOrToXor()
2496 !(LHS->hasOneUse() || RHS->hasOneUse())) in foldAndOrOfICmpEqZeroAndICmp()
2669 (RHS->hasOneUse() || LHS->hasOneUse())) { in foldAndOrOfICmps()
2836 if (Op0->hasOneUse() || Op1->hasOneUse()) { in visitOr()
3022 if (Op0->hasOneUse() && Op1->hasOneUse() && in visitOr()
3063 (Ov->hasOneUse() || (MulIsNotZero->hasOneUse() && Mul->hasOneUse())) && in visitOr()
[all …]
H A DInstCombineSelect.cpp300 (!TI->hasOneUse() || !FI->hasOneUse())) in foldSelectOpOp()
302 } else if (!TI->hasOneUse() || !FI->hasOneUse()) { in foldSelectOpOp()
320 (TI->hasOneUse() || FI->hasOneUse())) { in foldSelectOpOp()
339 (TII->hasOneUse() || FII->hasOneUse())) { in foldSelectOpOp()
369 !TI->hasOneUse() || !FI->hasOneUse()) in foldSelectOpOp()
666 (IC->hasOneUse() + Or->hasOneUse())) in foldSelectICmpAndOr()
991 if (II->hasOneUse() && SelectArg->hasOneUse() && in foldSelectCttzCtlz()
1101 if (!Cmp.hasOneUse() && !RHS->hasOneUse()) in canonicalizeSPF()
1769 if (!TI || !FI || !TI->hasOneUse() || !FI->hasOneUse()) in foldAddSubSelect()
2722 (CondVal->hasOneUse() || TrueVal->hasOneUse()) && in visitSelectInst()
[all …]
H A DInstCombineVectorOps.cpp250 if (X->hasOneUse() && Ext.getVectorOperand()->hasOneUse()) { in foldBitcastExtElt()
287 if (!X->hasOneUse() || !Ext.getVectorOperand()->hasOneUse()) in foldBitcastExtElt()
1474 if (!Vec->hasOneUse()) in narrowInsElt()
1534 (VecOp->hasOneUse() || ScalarOp->hasOneUse()) && in visitInsertElementInst()
1572 if (!Insert.hasOneUse()) in visitInsertElementInst()
1641 if (!I->hasOneUse()) in canEvaluateShuffled()
2140 if (!B0->hasOneUse() && !B1->hasOneUse()) in foldSelectShuffle()
2279 if (FNeg0->hasOneUse() || FNeg1->hasOneUse()) { in foldFNegShuffle()
2329 if (!Cast0->hasOneUse() && !Cast1->hasOneUse()) in foldCastShuffle()
2361 if (!Op0->hasOneUse()) in foldIdentityExtractShuffle()
[all …]
H A DInstCombineAddSub.cpp759 if (!LHS->hasOneUse() && !RHS->hasOneUse()) in checkForNegativeOperand()
952 if (C->isOne() && Op0->hasOneUse()) { in foldAddWithConstant()
1247 if (!Op0 || !Op1 || !(Op0->hasOneUse() || Op1->hasOneUse())) in factorizeMathWithShlOps()
1352 (LHS->hasOneUse() || RHS->hasOneUse())) { in visitAdd()
1391 if (SI && SI->hasOneUse()) { in visitAdd()
1497 if (!Op0->hasOneUse() || !Op1->hasOneUse()) in factorizeFAddFSub()
1602 if (LHSConv->hasOneUse() && in visitFAdd()
1621 (LHSConv->hasOneUse() || RHSConv->hasOneUse()) && in visitFAdd()
1768 (Op0->hasOneUse() || Op1->hasOneUse())) { in foldSubOfMinMax()
2018 (Op0->hasOneUse() || Op1->hasOneUse())) in visitSub()
[all …]
H A DInstructionCombining.cpp661 if (!V && LHS->hasOneUse() && RHS->hasOneUse()) in tryFactorization()
681 if (!V && LHS->hasOneUse() && RHS->hasOneUse()) in tryFactorization()
885 if (LHS->hasOneUse() && RHS->hasOneUse()) { in SimplifySelectsFeedingBinaryOp()
1160 if (!PN->hasOneUse()) { in foldOpIntoPhi()
1316 if (!Phi0 || !Phi1 || !Phi0->hasOneUse() || !Phi1->hasOneUse() || in foldBinopWithPhiOperands()
1417 !Src.hasOneUse()) in shouldMergeGEPs()
1554 if (!Op->hasOneUse()) in Descale()
1682 LHS->hasOneUse() && RHS->hasOneUse() && in foldVectorBinop()
1718 (LHS->hasOneUse() || RHS->hasOneUse() || LHS == RHS)) { in foldVectorBinop()
1903 (Op0->hasOneUse() || Op1->hasOneUse()))) { in narrowMathIfNoOverflow()
[all …]
H A DInstCombineCasts.cpp170 if (!AI.hasOneUse()) { in PromoteCastOfAllocation()
291 if (CSrc->hasOneUse()) in commonCastTransforms()
366 if (!V->hasOneUse()) in canNotEvaluateInType()
889 if (Src->hasOneUse()) { in visitTrunc()
909 if (Src->hasOneUse() && in visitTrunc()
1268 if (SrcOp->hasOneUse()) in visitZExt()
1390 if (ICI->hasOneUse() && in transformSExtICmp()
1558 if (Src->hasOneUse() && in visitSExt()
1783 if (BO && BO->hasOneUse()) { in visitFPTrunc()
1914 if (!Src->hasOneUse()) in visitFPTrunc()
[all …]
H A DInstCombineCompares.cpp1626 if (Xor->hasOneUse()) { in foldICmpXorConstant()
1768 if (!And->hasOneUse()) in foldICmpAndConstConst()
2722 if (!Sub->hasOneUse()) in foldICmpSubConstant()
2834 if (!Add->hasOneUse()) in foldICmpAddConstant()
2928 if (Cmp.hasOneUse() && in foldICmpSelectConstant()
3608 if (SI->hasOneUse()) in foldSelectICmp()
4271 (BO0->hasOneUse() || BO1->hasOneUse()) && !I.isUnsigned()) { in foldICmpBinOp()
4781 (I.getOperand(0)->hasOneUse() || I.getOperand(1)->hasOneUse())) { in foldICmpEquality()
5996 V1Ty == V2->getType() && (LHS->hasOneUse() || RHS->hasOneUse())) { in foldVectorCmp()
6189 if (I.hasOneUse()) in visitICmpInst()
[all …]
H A DInstCombineMulDivRem.cpp50 if (!V->hasOneUse()) return nullptr; in simplifyValueKnownNonZero()
208 if (Op0->hasOneUse() && match(Op1, m_NegatedPower2())) { in visitMul()
280 if (Div && Div->hasOneUse() && in visitMul()
343 (Op0->hasOneUse() || Op1->hasOneUse() || X == Y)) { in visitMul()
353 (Op0->hasOneUse() || Op1->hasOneUse())) { in visitMul()
450 (Op0->hasOneUse() || Op1->hasOneUse())) { in foldFPSignBitOps()
707 if (SI->use_empty() && SelectCond->hasOneUse()) in simplifyDivRemOfSelectWithZeroOp()
981 if (MinMax && MinMax->hasOneUse() && !MinMax->isSigned()) in takeLog2()
1002 X->getType() == Y->getType() && (N->hasOneUse() || D->hasOneUse())) { in narrowUDivURem()
1291 if (!II || !II->hasOneUse() || !I.hasAllowReassoc() || in foldFDivPowDivisor()
[all …]
H A DInstCombineShifts.cpp198 !Trunc->hasOneUse()) in dropRedundantMaskingOfLeftShiftInput()
302 if (!Masked->hasOneUse()) in dropRedundantMaskingOfLeftShiftInput()
457 if (Op1->hasOneUse() && match(Op1, m_SRem(m_Value(A), m_Constant(C))) && in commonShiftTransforms()
537 if (!I->hasOneUse()) return false; in canEvaluateShifted()
762 if (!Op0->hasOneUse()) in FoldShiftByConstant()
971 if (Op0BO->isCommutative() && Y->hasOneUse() && in visitShl()
1101 if (Op0->hasOneUse()) { in visitLShr()
1116 if (Op0->hasOneUse()) { in visitLShr()
1164 Op0->hasOneUse()) { in visitLShr()
1219 (TruncSrc->hasOneUse() || C1->uge(SrcWidth - BitWidth))) { in visitLShr()
[all …]
H A DInstCombineCalls.cpp113 if (!Src->hasOneUse()) in hasUndefSource()
629 if (Op0->hasOneUse() && in foldCtpop()
902 if (!MinMax2->hasOneUse() || !AddSub->hasOneUse()) in matchSAddSubSat()
1034 (!LHS->hasOneUse() && !RHS->hasOneUse())) in factorizeMinMaxTree()
1045 if (LHS->hasOneUse()) { in factorizeMinMaxTree()
1310 (I0->hasOneUse() || I1->hasOneUse()) && X->getType() == Y->getType()) { in visitCallInst()
1316 I0->hasOneUse()) { in visitCallInst()
1332 (I0->hasOneUse() || I1->hasOneUse()) && X->getType() == Y->getType()) { in visitCallInst()
1352 (I0->hasOneUse() || I1->hasOneUse())) { in visitCallInst()
1395 if (I0->hasOneUse() && !I1->hasOneUse()) in visitCallInst()
[all …]
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DGuardUtils.cpp67 if (!Cond->hasOneUse()) in parseWidenableBranch()
93 A->hasOneUse()) { in parseWidenableBranch()
100 B->hasOneUse()) { in parseWidenableBranch()
/llvm-project-15.0.7/llvm/lib/Target/RISCV/
H A DRISCVMergeBaseOffset.cpp98 !MRI->hasOneUse(HiLUI.getOperand(0).getReg())) in INITIALIZE_PASS()
155 if (!MRI->hasOneUse(Reg)) in matchLargeOffset()
172 !MRI->hasOneUse(OffsetLui.getOperand(0).getReg())) in matchLargeOffset()
222 if (!MRI->hasOneUse(Rs1)) in matchShiftedOffset()
258 if (MRI->hasOneUse(DestReg)) { in detectAndFoldOffset()
272 if (MRI->hasOneUse(TailDestReg)) { in detectAndFoldOffset()
/llvm-project-15.0.7/llvm/lib/CodeGen/SelectionDAG/
H A DDAGCombiner.cpp2566 N0->hasOneUse() && N1->hasOneUse()) { in visitADDLike()
5268 if (!N0.hasOneUse() && !N1.hasOneUse()) in hoistLogicOpWithSameOpcodeHands()
5292 if (!N0.hasOneUse() && !N1.hasOneUse()) in hoistLogicOpWithSameOpcodeHands()
5316 if (!N0.hasOneUse() || !N1.hasOneUse()) in hoistLogicOpWithSameOpcodeHands()
5325 if (!N0.hasOneUse() || !N1.hasOneUse()) in hoistLogicOpWithSameOpcodeHands()
5492 N0.hasOneUse() && N1.hasOneUse()) { in foldLogicOfSetCCs()
6564 if (!N0->hasOneUse() || !N1->hasOneUse()) in MatchBSwapHWordLow()
6756 if (!N0->hasOneUse() || !N1->hasOneUse()) in matchBSwapHWordOrAndAnd()
11623 if (!N0.hasOneUse() || !N1.hasOneUse()) in CombineZExtLogicopShiftLoad()
23734 !LHS.hasOneUse() || !RHS.hasOneUse()) in SimplifySelectOps()
[all …]
/llvm-project-15.0.7/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()
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DReassociate.cpp167 if (BO && BO->hasOneUse() && in isReassociableOp()
531 if (!Op->hasOneUse()) { in LinearizeExprTree()
570 if (!Op->hasOneUse()) in LinearizeExprTree()
1056 if (Sub->hasOneUse() && in ShouldBreakUpSubtract()
1327 if (!Opnd1->getValue()->hasOneUse()) in CombineXorOpnd()
1361 if (Opnd1->getValue()->hasOneUse()) in CombineXorOpnd()
1363 if (Opnd2->getValue()->hasOneUse()) in CombineXorOpnd()
2209 (I->hasOneUse() && in OptimizeInst()
2267 (!I->hasOneUse() || in OptimizeInst()
2294 (!I->hasOneUse() || in OptimizeInst()
[all …]
/llvm-project-15.0.7/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.cpp623 if (!N.hasOneUse()) in IsProfitableToFold()
779 return N->getOperand(1).hasOneUse(); in isProfitableToFormMaskedOp()
835 if (!Chain.hasOneUse()) in isCalleeLoad()
851 Callee.getValue(1).hasOneUse()) in isCalleeLoad()
1911 !Shift.hasOneUse()) in foldMaskAndShiftToExtract()
1978 if (!N.hasOneUse() || !Shift.hasOneUse()) in foldMaskedShiftToScaledMask()
2135 !Shift.hasOneUse() || !N.hasOneUse()) in foldMaskedShiftToBEXTR()
3122 if (!Load.hasOneUse()) in isFusableLoadOpStorePattern()
3806 if (!N0->hasOneUse()) in matchBEXTRFromAndImm()
4331 if (!Op.hasOneUse()) in tryVPTERNLOG()
[all …]
/llvm-project-15.0.7/llvm/lib/Target/AMDGPU/
H A DAMDGPULowerKernelAttributes.cpp88 if (!U->hasOneUse()) in processUse()
96 if (!BCI || !BCI->hasOneUse()) in processUse()
/llvm-project-15.0.7/llvm/lib/Target/SystemZ/
H A DSystemZTargetTransformInfo.cpp488 if (I->hasOneUse() && in getArithmeticInstrCost()
498 if (I->hasOneUse() && I->getOpcode() == Instruction::Xor) in getArithmeticInstrCost()
931 if (!Ld->hasOneUse() && Ld->getParent() == I->getParent() && in getCmpSelInstrCost()
1022 if (!Ld->hasOneUse()) in isFoldableLoad()
1030 if (UserI->hasOneUse()) { in isFoldableLoad()
1153 if (Opcode == Instruction::Load && I->hasOneUse()) { in getMemoryOpCost()
1157 (!LdUser->hasOneUse() || !isa<StoreInst>(*LdUser->user_begin()))) in getMemoryOpCost()
1162 if (StoredVal->hasOneUse() && isBswapIntrinsicCall(StoredVal)) in getMemoryOpCost()
/llvm-project-15.0.7/mlir/test/lib/Transforms/
H A DTestInlining.cpp58 /*shouldCloneInlinedRegion=*/!callee.getResult().hasOneUse()))) in runOnOperation()
/llvm-project-15.0.7/mlir/test/lib/IR/
H A DTestPrintDefUse.cpp52 if (result.hasOneUse()) { in runOnOperation()
/llvm-project-15.0.7/mlir/test/lib/Dialect/Tensor/
H A DTestTensorTransforms.cpp65 if (!op.getSource().hasOneUse()) in applyFoldConstantExtractSlicePatterns()
/llvm-project-15.0.7/llvm/lib/Target/WebAssembly/
H A DWebAssemblyRegStackify.cpp283 static bool hasOneUse(unsigned Reg, MachineInstr *Def, MachineRegisterInfo &MRI, in hasOneUse() function
286 if (MRI.hasOneUse(Reg)) in hasOneUse()
528 if (MRI.hasOneDef(Reg) && MRI.hasOneUse(Reg)) { in moveForSingleUse()
875 if (CanMove && hasOneUse(Reg, DefI, MRI, MDT, LIS)) { in runOnMachineFunction()
912 if (DefReg != UseReg || !MRI.hasOneUse(DefReg)) in runOnMachineFunction()
/llvm-project-15.0.7/mlir/lib/Dialect/SCF/Transforms/
H A DLoopRangeFolding.cpp44 if (!indVar.hasOneUse()) in runOnOperation()
/llvm-project-15.0.7/mlir/lib/Analysis/
H A DSliceAnalysis.cpp276 if (!redCarriedVal.hasOneUse()) in matchReduction()
297 combinerOp->getNumResults() != 1 || !combinerOp->hasOneUse() || in matchReduction()

12345678