Home
last modified time | relevance | path

Searched refs:SelectInst (Results 1 – 25 of 103) sorted by relevance

12345

/openbsd-src/gnu/llvm/llvm/lib/CodeGen/
H A DSelectOptimize.cpp133 using SelectGroup = SmallVector<SelectInst *, 2>;
172 bool isConvertToBranchProfitableBase(const SmallVector<SelectInst *, 2> &ASI);
177 bool hasExpensiveColdOperand(const SmallVector<SelectInst *, 2> &ASI);
186 bool isSelectHighlyPredictable(const SelectInst *SI);
205 Scaled64 getMispredictionCost(const SelectInst *SI, const Scaled64 CondCost);
209 const SelectInst *SI);
212 bool isSelectKindSupported(SelectInst *SI);
321 getTrueOrFalseValue(SelectInst *SI, bool isTrue, in getTrueOrFalseValue()
324 for (SelectInst *DefSI = SI; DefSI != nullptr && Selects.count(DefSI); in getTrueOrFalseValue()
325 DefSI = dyn_cast<SelectInst>(V)) { in getTrueOrFalseValue()
[all …]
/openbsd-src/gnu/llvm/llvm/lib/Transforms/ObjCARC/
H A DProvenanceAnalysis.cpp41 bool ProvenanceAnalysis::relatedSelect(const SelectInst *A, in relatedSelect()
45 if (const SelectInst *SB = dyn_cast<SelectInst>(B)) { in relatedSelect()
162 if (const SelectInst *S = dyn_cast<SelectInst>(A)) in relatedCheck()
164 if (const SelectInst *S = dyn_cast<SelectInst>(B)) in relatedCheck()
H A DProvenanceAnalysis.h37 class SelectInst; variable
63 bool relatedSelect(const SelectInst *A, const Value *B);
/openbsd-src/gnu/llvm/llvm/lib/Transforms/InstCombine/
H A DInstCombineSelect.cpp55 static Instruction *foldSelectBinOpIdentity(SelectInst &Sel, in foldSelectBinOpIdentity()
120 static Value *foldSelectICmpAnd(SelectInst &Sel, ICmpInst *Cmp, in foldSelectICmpAnd()
263 Instruction *InstCombinerImpl::foldSelectOpOp(SelectInst &SI, Instruction *TI, in foldSelectOpOp()
462 Instruction *InstCombinerImpl::foldSelectIntoOp(SelectInst &SI, Value *TrueVal, in foldSelectIntoOp()
466 auto TryFoldSelectIntoOp = [&](SelectInst &SI, Value *TrueVal, in foldSelectIntoOp()
716 static Instruction *foldSetClearBits(SelectInst &Sel, in foldSetClearBits()
756 static Instruction *foldSelectZeroOrMul(SelectInst &SI, InstCombinerImpl &IC) { in foldSelectZeroOrMul()
1044 static bool adjustMinMax(SelectInst &Sel, ICmpInst &Cmp) { in adjustMinMax()
1134 static Instruction *canonicalizeSPF(SelectInst &Sel, ICmpInst &Cmp, in canonicalizeSPF()
1223 Instruction *InstCombinerImpl::foldSelectValueEquivalence(SelectInst &Sel, in foldSelectValueEquivalence()
[all …]
H A DInstCombineInternal.h144 Instruction *visitSelectInst(SelectInst &SI);
191 bool replacedSelectWithOperand(SelectInst *SI, const ICmpInst *Icmp,
388 Instruction *foldAndOrOfSelectUsingImpliedCond(Value *Op, SelectInst &SI,
462 bool matchThreeWayIntCompare(SelectInst *SI, Value *&LHS, Value *&RHS,
498 Instruction *foldVectorSelect(SelectInst &Sel);
520 Instruction *FoldOpIntoSelect(Instruction &Op, SelectInst *SI,
550 Instruction *foldSelectICmp(ICmpInst::Predicate Pred, SelectInst *SI,
581 Instruction *foldICmpSelectConstant(ICmpInst &Cmp, SelectInst *Select,
628 Instruction *foldSelectOfBools(SelectInst &SI);
629 Instruction *foldSelectExtConst(SelectInst &Sel);
[all …]
H A DInstCombineMulDivRem.cpp421 return SelectInst::Create(X, Op1, ConstantInt::getNullValue(Ty)); in visitMul()
423 return SelectInst::Create(X, Op0, ConstantInt::getNullValue(Ty)); in visitMul()
430 return SelectInst::Create(X, NegC, ConstantInt::getNullValue(Ty)); in visitMul()
439 return SelectInst::Create(IsNeg, NegC, ConstantInt::getNullValue(Ty)); in visitMul()
450 return SelectInst::Create(IsNeg, Y, ConstantInt::getNullValue(Ty)); in visitMul()
456 return SelectInst::Create(Tr, Y, ConstantInt::getNullValue(Ty)); in visitMul()
775 SelectInst *SI = dyn_cast<SelectInst>(I.getOperand(1)); in simplifyDivRemOfSelectWithZeroOp()
960 if (Instruction *R = FoldOpIntoSelect(I, cast<SelectInst>(Op1), in commonIDivTransforms()
1043 return SelectInst::Create(Cmp, F1, ConstantInt::get(Ty, 0)); in commonIDivTransforms()
1168 if (SelectInst *SI = dyn_cast<SelectInst>(Op)) in takeLog2()
[all …]
H A DInstCombineLoadStoreAlloca.cpp75 if (isa<PHINode, SelectInst>(I)) { in isOnlyCopiedFromConstantMemory()
323 } else if (auto *SI = dyn_cast<SelectInst>(Inst)) { in collectUsersRecursive()
401 } else if (auto *SI = dyn_cast<SelectInst>(I)) { in replace()
402 auto *NewSI = SelectInst::Create( in replace()
837 if (SelectInst *SI = dyn_cast<SelectInst>(P)) { in isObjectSizeLessThanOrEq()
1089 if (SelectInst *SI = dyn_cast<SelectInst>(Op)) { in visitLoadInst()
1107 return SelectInst::Create(SI->getCondition(), V1, V2); in visitLoadInst()
H A DInstCombineAddSub.cpp876 return SelectInst::Create(X, InstCombiner::AddOne(Op1C), Op1); in foldAddWithConstant()
880 return SelectInst::Create(X, InstCombiner::SubOne(Op1C), Op1); in foldAddWithConstant()
2060 return SelectInst::Create(X, InstCombiner::SubOne(C), C); in visitSub()
2063 return SelectInst::Create(X, InstCombiner::AddOne(C), C); in visitSub()
2070 if (SelectInst *SI = dyn_cast<SelectInst>(Op1)) in visitSub()
2234 SelectInst *NewSel = in visitSub()
2235 SelectInst::Create(Cond, OtherHandOfSubIsTrueVal ? Zero : NewSub, in visitSub()
2318 return SelectInst::Create(IsNeg, NegA, A); in visitSub()
2485 auto propagateSelectFMF = [&](SelectInst *S, bool CommonOperand) { in visitFNeg()
2487 if (auto *OldSel = dyn_cast<SelectInst>(Op)) { in visitFNeg()
[all …]
H A DInstCombineAndOrXor.cpp1376 return SelectInst::Create(Cond, Builder.CreateNeg(X, X->getName() + ".neg"), in canonicalizeConditionalNegationViaMathToSelect()
1985 return SelectInst::Create(Cmp, ConstantInt::getNullValue(Ty), Y); in visitAnd()
2145 return SelectInst::Create(Cmp, ConstantInt::get(Ty, *C), in visitAnd()
2165 return SelectInst::Create(Cmp, ConstantInt::get(Ty, *C3), in visitAnd()
2182 return SelectInst::Create(Cmp, ConstantInt::get(Ty, *C3), in visitAnd()
2212 if (auto *SI0 = dyn_cast<SelectInst>(Op0)) { in visitAnd()
2217 if (auto *SI1 = dyn_cast<SelectInst>(Op1)) { in visitAnd()
2301 bool IsLogical = isa<SelectInst>(Op1); in visitAnd()
2318 bool IsLogical = isa<SelectInst>(Op0); in visitAnd()
2358 return SelectInst::Create(A, Op1, Constant::getNullValue(Ty)); in visitAnd()
[all …]
H A DInstCombineShifts.cpp391 if (SelectInst *SI = dyn_cast<SelectInst>(Op1)) in commonShiftTransforms()
553 SelectInst *SI = cast<SelectInst>(I); in canEvaluateShifted()
818 return SelectInst::Create(Cond, NewOp, NewShift); in FoldShiftByConstant()
835 return SelectInst::Create(Cond, NewShift, NewOp); in FoldShiftByConstant()
1126 return SelectInst::Create(X, NewC, ConstantInt::getNullValue(Ty)); in visitShl()
1258 return SelectInst::Create(X, NewC, ConstantInt::getNullValue(Ty)); in visitLShr()
/openbsd-src/gnu/llvm/llvm/lib/Transforms/Instrumentation/
H A DControlHeightReduction.cpp138 SmallVector<SelectInst *, 8> Selects;
275 DenseSet<SelectInst *> TrueBiasedSelects;
276 DenseSet<SelectInst *> FalseBiasedSelects;
355 void fixupSelect(SelectInst *SI, CHRScope *Scope, IRBuilder<> &IRB,
386 DenseSet<SelectInst *> TrueBiasedSelectsGlobal;
388 DenseSet<SelectInst *> FalseBiasedSelectsGlobal;
392 DenseMap<SelectInst *, BranchProbability> SelectBiasMap;
471 return isa<BinaryOperator>(I) || isa<CastInst>(I) || isa<SelectInst>(I) || in isHoistableInstructionType()
661 SelectInst *SI, Region *R, in checkBiasedSelect()
662 DenseSet<SelectInst *> &TrueBiasedSelectsGlobal, in checkBiasedSelect()
[all …]
/openbsd-src/gnu/llvm/llvm/include/llvm/Transforms/Scalar/
H A DSROA.h37 class SelectInst; variable
137 SmallMapVector<SelectInst *, sroa::RewriteableMemOps, 8> SelectsToRewrite;
156 isSafeSelectToSpeculate(SelectInst &SI, bool PreserveCFG);
H A DJumpThreading.h41 class SelectInst; variable
157 void unfoldSelectInstr(BasicBlock *Pred, BasicBlock *BB, SelectInst *SI,
/openbsd-src/gnu/llvm/llvm/lib/Transforms/Scalar/
H A DDFAJumpThreading.cpp119 SelectInst *SI;
123 SelectInstToUnfold(SelectInst *SI, PHINode *SIUse) : SI(SI), SIUse(SIUse) {} in SelectInstToUnfold()
125 SelectInst *getInst() { return SI; } in getInst()
220 DomTreeUpdater *DTU, SelectInst *SI, PHINode *SIUse, SelectInst *SIToSink, in createBasicBlockAndSinkSelectInst()
246 SelectInst *SI = SIToUnfold.getInst(); in unfold()
264 if (SelectInst *SIOp = dyn_cast<SelectInst>(SI->getTrueValue())) { in unfold()
269 if (SelectInst *SIOp = dyn_cast<SelectInst>(SI->getFalseValue())) { in unfold()
466 } else if (SelectInst *SelI = dyn_cast<SelectInst>(Current)) { in isCandidate()
498 bool isValidSelectInst(SelectInst *SI) { in isValidSelectInst()
504 if (!SIUse && !(isa<PHINode>(SIUse) || isa<SelectInst>(SIUse))) in isValidSelectInst()
[all …]
H A DTailRecursionElimination.cpp415 SmallVector<SelectInst *, 8> RetSelects;
702 SelectInst *SI = SelectInst::Create( in eliminateCall()
775 SelectInst *SI = SelectInst::Create( in cleanupAndFinalize()
785 for (SelectInst *SI : RetSelects) { in cleanupAndFinalize()
H A DJumpThreading.cpp966 if (SelectInst *SI = dyn_cast<SelectInst>(I)) { in computeValueKnownInPredecessorsImpl()
2757 SelectInst *SI, PHINode *SIUse, in unfoldSelectInstr()
2818 SelectInst *PredSI = dyn_cast<SelectInst>(CondPHI->getIncomingValue(I)); in tryToUnfoldSelect()
2859 SelectInst *SI = dyn_cast<SelectInst>(CondLHS->getIncomingValue(I)); in tryToUnfoldSelect()
2927 auto isUnfoldCandidate = [BB](SelectInst *SI, Value *V) { in tryToUnfoldSelectInCurrBB()
2938 SelectInst *SI = nullptr; in tryToUnfoldSelectInCurrBB()
2945 if (SelectInst *SelectI = dyn_cast<SelectInst>(Cmp->user_back())) in tryToUnfoldSelectInCurrBB()
2950 } else if (SelectInst *SelectI = dyn_cast<SelectInst>(U.getUser())) { in tryToUnfoldSelectInCurrBB()
H A DSROA.cpp723 static Value *foldSelectInst(SelectInst &SI) { in foldSelectInst()
741 return foldSelectInst(cast<SelectInst>(I)); in foldPHINodeOrSelectInst()
1081 !isa<SelectInst>(I) && !isa<AddrSpaceCastInst>(I)) { in hasUnsafePHIOrSelectUse()
1094 assert(isa<PHINode>(I) || isa<SelectInst>(I)); in visitPHINodeOrSelectInst()
1153 void visitSelectInst(SelectInst &SI) { visitPHINodeOrSelectInst(SI); } in visitSelectInst()
1449 isSafeLoadOfSelectToSpeculate(LoadInst &LI, SelectInst &SI, bool PreserveCFG) { in isSafeLoadOfSelectToSpeculate()
1465 SROAPass::isSafeSelectToSpeculate(SelectInst &SI, bool PreserveCFG) { in isSafeSelectToSpeculate()
1511 static void speculateSelectInstLoads(SelectInst &SI, LoadInst &LI, in speculateSelectInstLoads()
1555 static void rewriteMemOpOfSelect(SelectInst &SI, T &I, in rewriteMemOpOfSelect()
1616 static void rewriteMemOpOfSelect(SelectInst &SelInst, Instruction &I, in rewriteMemOpOfSelect()
[all …]
H A DLowerExpectIntrinsic.cpp387 if (SelectInst *SI = dyn_cast<SelectInst>(&Inst)) { in lowerExpectIntrinsic()
/openbsd-src/gnu/llvm/llvm/lib/Target/Hexagon/
H A DHexagonLoopIdiomRecognition.cpp622 bool matchLeftShift(SelectInst *SelI, Value *CIV, ParsedValues &PV);
623 bool matchRightShift(SelectInst *SelI, ParsedValues &PV);
624 bool scanSelect(SelectInst *SI, BasicBlock *LoopB, BasicBlock *PrehB,
683 bool PolynomialMultiplyRecognize::matchLeftShift(SelectInst *SelI, in matchLeftShift()
798 bool PolynomialMultiplyRecognize::matchRightShift(SelectInst *SelI, in matchRightShift()
873 bool PolynomialMultiplyRecognize::scanSelect(SelectInst *SelI, in scanSelect()
1648 if (SelectInst *Sel = dyn_cast<SelectInst>(BO->getOperand(0))) { in setupPreSimplifier()
1656 if (SelectInst *Sel = dyn_cast<SelectInst>(BO->getOperand(1))) { in setupPreSimplifier()
1670 SelectInst *Sel = dyn_cast<SelectInst>(I); in setupPreSimplifier()
1675 if (SelectInst *Sel0 = dyn_cast<SelectInst>(Sel->getTrueValue())) { in setupPreSimplifier()
[all …]
/openbsd-src/gnu/llvm/llvm/lib/Analysis/
H A DIVDescriptors.cpp369 if (!Cur->isCommutative() && !IsAPhi && !isa<SelectInst>(Cur) && in AddReductionVar()
388 if (auto *Sel = dyn_cast<SelectInst>(ReduxDesc.getPatternInst())) { in AddReductionVar()
405 bool IsASelect = isa<SelectInst>(Cur); in AddReductionVar()
424 (isa<ICmpInst>(Cur) || isa<SelectInst>(Cur))) in AddReductionVar()
427 (isa<FCmpInst>(Cur) || isa<SelectInst>(Cur))) in AddReductionVar()
490 !isa<SelectInst>(UI)) || in AddReductionVar()
638 if (auto *Select = dyn_cast<SelectInst>(*I->user_begin())) in isSelectCmpPattern()
647 SelectInst *SI = cast<SelectInst>(I); in isSelectCmpPattern()
670 assert((isa<CmpInst>(I) || isa<SelectInst>(I) || isa<CallInst>(I)) && in isMinMaxPattern()
679 if (auto *Select = dyn_cast<SelectInst>(*I->user_begin())) in isMinMaxPattern()
[all …]
H A DBasicAliasAnalysis.cpp725 if (const SelectInst *SI = dyn_cast<SelectInst>(V)) { in getModRefInfoMask()
1267 BasicAAResult::aliasSelect(const SelectInst *SI, LocationSize SISize, in aliasSelect()
1272 if (const SelectInst *SI2 = dyn_cast<SelectInst>(V2)) in aliasSelect()
1637 if (const SelectInst *S1 = dyn_cast<SelectInst>(V1)) { in aliasCheckRecursive()
1641 } else if (const SelectInst *S2 = dyn_cast<SelectInst>(V2)) { in aliasCheckRecursive()
/openbsd-src/gnu/llvm/llvm/include/llvm/Analysis/
H A DMemoryBuiltins.h48 class SelectInst; variable
239 SizeOffsetType visitSelectInst(SelectInst &I);
312 SizeOffsetEvalType visitSelectInst(SelectInst &I);
H A DBasicAliasAnalysis.h32 class SelectInst; variable
133 AliasResult aliasSelect(const SelectInst *SI, LocationSize SISize,
/openbsd-src/gnu/llvm/llvm/lib/Target/AMDGPU/
H A DAMDGPUCodeGenPrepare.cpp99 bool isSigned(const SelectInst &I) const;
136 bool promoteUniformOpToI32(SelectInst &I) const;
214 bool visitSelectInst(SelectInst &I);
257 bool AMDGPUCodeGenPrepare::isSigned(const SelectInst &I) const { in isSigned()
393 bool AMDGPUCodeGenPrepare::promoteUniformOpToI32(SelectInst &I) const { in promoteUniformOpToI32()
582 static SelectInst *findSelectThroughCast(Value *V, CastInst *&Cast) { in findSelectThroughCast()
584 if (SelectInst *Sel = dyn_cast<SelectInst>(V)) in findSelectThroughCast()
588 if (SelectInst *Sel = dyn_cast<SelectInst>(Cast->getOperand(0))) in findSelectThroughCast()
604 SelectInst *Sel = findSelectThroughCast(BO.getOperand(0), CastOp); in foldBinOpIntoSelect()
1375 bool AMDGPUCodeGenPrepare::visitSelectInst(SelectInst &I) { in visitSelectInst()
/openbsd-src/gnu/llvm/llvm/lib/Transforms/IPO/
H A DCalledValuePropagation.cpp184 return visitSelect(*cast<SelectInst>(&I), ChangedValues, SS); in ComputeInstructionState()
302 void visitSelect(SelectInst &I, in visitSelect()

12345