Home
last modified time | relevance | path

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

12345

/llvm-project-15.0.7/llvm/lib/CodeGen/
H A DSelectOptimize.cpp321 DefSI = dyn_cast<SelectInst>(V)) { in getTrueOrFalseValue()
373 for (SelectInst *SI : ASI) { in convertProfitableSIGroups()
418 SelectInst *SI = ASI.front(); in convertProfitableSIGroups()
419 SelectInst *LastSI = ASI.back(); in convertProfitableSIGroups()
501 SelectInst *SI = *It; in convertProfitableSIGroups()
522 if (SelectInst *SI = dyn_cast<SelectInst>(I)) { in collectSelectGroups()
527 SelectInst *NSI = dyn_cast<SelectInst>(NI); in collectSelectGroups()
582 for (SelectInst *SI : ASI) { in findProfitableSIGroupsInnerLoops()
606 SelectInst *SI = ASI.front(); in isConvertToBranchProfitableBase()
673 for (SelectInst *SI : ASI) { in hasExpensiveColdOperand()
[all …]
H A DCodeGenPrepare.cpp411 bool optimizeSelectInst(SelectInst *SI);
1680 if (isa<SelectInst>(U) && cast<SelectInst>(U)->getCondition() == Cmp) in foldICmpWithDominatingICmp()
3778 if (SelectInst *Select = dyn_cast<SelectInst>(V)) { in FillPlaceholders()
3823 if (SelectInst *CurrentSelect = dyn_cast<SelectInst>(Current)) { in InsertPlaceholders()
3826 SelectInst *Select = SelectInst::Create( in InsertPlaceholders()
5153 if (SelectInst *SI = dyn_cast<SelectInst>(V)) { in optimizeMemoryInst()
6655 SelectInst *SI, bool isTrue, in getTrueOrFalseValue()
6745 SmallVector<SelectInst *, 2> ASI; in optimizeSelectInst()
6749 SelectInst *I = dyn_cast<SelectInst>(&*It); in optimizeSelectInst()
6757 SelectInst *LastSI = ASI.back(); in optimizeSelectInst()
[all …]
/llvm-project-15.0.7/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()
150 if (const SelectInst *S = dyn_cast<SelectInst>(A)) in relatedCheck()
152 if (const SelectInst *S = dyn_cast<SelectInst>(B)) in relatedCheck()
H A DProvenanceAnalysis.h36 class SelectInst; variable
62 bool relatedSelect(const SelectInst *A, const Value *B);
/llvm-project-15.0.7/llvm/lib/Transforms/Instrumentation/
H A DControlHeightReduction.cpp129 SmallVector<SelectInst *, 8> Selects;
350 void fixupSelect(SelectInst* SI,
651 SelectInst *SI, Region *R, in checkBiasedSelect()
676 for (SelectInst *SI : RI.Selects) { in getBranchInsertPoint()
689 for (SelectInst *SI : RI.Selects) { in getBranchInsertPoint()
879 for (SelectInst *SI : Selects) { in checkScopeHoistable()
884 SelectInst *SI = *it; in checkScopeHoistable()
1022 for (SelectInst *SI : RI.Selects) { in getCHRConditionValuesForRegion()
1100 for (SelectInst *SI : RI.Selects) in getSelectsInScope()
1506 if (isa<SelectInst>(U) && cast<SelectInst>(U)->getCondition() == ICmp) in negateICmpIfUsedByBranchOrSelectOnly()
[all …]
/llvm-project-15.0.7/llvm/include/llvm/Transforms/Scalar/
H A DSROA.h32 class SelectInst; variable
109 SetVector<SelectInst *, SmallVector<SelectInst *, 2>> SpeculatableSelects;
H A DJumpThreading.h41 class SelectInst; variable
157 void unfoldSelectInstr(BasicBlock *Pred, BasicBlock *BB, SelectInst *SI,
/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineSelect.cpp1285 if (!isa<SelectInst>(Sel1)) { in canonicalizeClampLike()
2142 static Value *foldSelectCmpXchg(SelectInst &SI) { in foldSelectCmpXchg()
2487 return SelectInst::Create(Op, A, Zero); in foldAndOrOfSelectUsingImpliedCond()
2492 return SelectInst::Create(Op, One, A); in foldAndOrOfSelectUsingImpliedCond()
2498 return SelectInst::Create(Op, B, Zero); in foldAndOrOfSelectUsingImpliedCond()
2503 return SelectInst::Create(Op, One, B); in foldAndOrOfSelectUsingImpliedCond()
2776 if (auto *Op1SI = dyn_cast<SelectInst>(Op1)) in visitSelectInst()
2826 return SelectInst::Create(C1, A, B); in visitSelectInst()
2828 return SelectInst::Create(C2, B, A); in visitSelectInst()
3021 if (SelectInst *TrueSI = dyn_cast<SelectInst>(TrueVal)) { in visitSelectInst()
[all …]
H A DInstCombineInternal.h143 Instruction *visitSelectInst(SelectInst &SI);
189 bool replacedSelectWithOperand(SelectInst *SI, const ICmpInst *Icmp,
570 bool matchThreeWayIntCompare(SelectInst *SI, Value *&LHS, Value *&RHS,
606 Instruction *foldVectorSelect(SelectInst &Sel);
628 Instruction *FoldOpIntoSelect(Instruction &Op, SelectInst *SI,
658 Instruction *foldSelectICmp(ICmpInst::Predicate Pred, SelectInst *SI,
689 Instruction *foldICmpSelectConstant(ICmpInst &Cmp, SelectInst *Select,
734 Instruction *foldSelectExtConst(SelectInst &Sel);
736 Instruction *foldSelectIntoOp(SelectInst &SI, Value *, Value *);
740 Instruction *foldSelectInstWithICmp(SelectInst &SI, ICmpInst *ICI);
[all …]
H A DInstCombineMulDivRem.cpp361 return SelectInst::Create(X, Op1, ConstantInt::getNullValue(Ty)); in visitMul()
396 return SelectInst::Create(Tr, Y, ConstantInt::getNullValue(Ty)); in visitMul()
681 SelectInst *SI = dyn_cast<SelectInst>(I.getOperand(1)); in simplifyDivRemOfSelectWithZeroOp()
802 if (Instruction *R = FoldOpIntoSelect(I, cast<SelectInst>(Op1), in commonIDivTransforms()
885 return SelectInst::Create(Cmp, F1, ConstantInt::get(Ty, 0)); in commonIDivTransforms()
971 if (SelectInst *SI = dyn_cast<SelectInst>(Op)) in takeLog2()
1183 return SelectInst::Create(Cond, ConstantInt::get(Ty, 1), in visitSDiv()
1356 if (SelectInst *SI = dyn_cast<SelectInst>(Op1)) in visitFDiv()
1361 if (SelectInst *SI = dyn_cast<SelectInst>(Op0)) in visitFDiv()
1471 if (SelectInst *SI = dyn_cast<SelectInst>(Op0I)) { in commonIRemTransforms()
[all …]
H A DInstCombineAddSub.cpp1385 SelectInst *SI = dyn_cast<SelectInst>(LHS); in visitAdd()
1388 SI = dyn_cast<SelectInst>(RHS); in visitAdd()
1400 return SelectInst::Create(SI->getCondition(), N, A); in visitAdd()
1404 return SelectInst::Create(SI->getCondition(), A, N); in visitAdd()
1953 if (SelectInst *SI = dyn_cast<SelectInst>(Op1)) in visitSub()
2095 SelectInst *NewSel = in visitSub()
2178 return SelectInst::Create(IsNeg, NegA, A); in visitSub()
2325 if (auto *OldSel = dyn_cast<SelectInst>(Op)) in visitFNeg()
2334 SelectInst *NewSel = SelectInst::Create(Cond, P, NegY); in visitFNeg()
2341 SelectInst *NewSel = SelectInst::Create(Cond, NegX, P); in visitFNeg()
[all …]
H A DInstCombineAndOrXor.cpp2008 if (auto *SI0 = dyn_cast<SelectInst>(Op0)) { in visitAnd()
2013 if (auto *SI1 = dyn_cast<SelectInst>(Op1)) { in visitAnd()
2097 bool IsLogical = isa<SelectInst>(Op1); in visitAnd()
2114 bool IsLogical = isa<SelectInst>(Op0); in visitAnd()
2736 if (auto *SI0 = dyn_cast<SelectInst>(Op0)) { in visitOr()
2741 if (auto *SI1 = dyn_cast<SelectInst>(Op1)) { in visitOr()
2943 bool IsLogical = isa<SelectInst>(Op1); in visitOr()
2960 bool IsLogical = isa<SelectInst>(Op0); in visitOr()
3027 return SelectInst::Create(X, orTrue, orFalse); in visitOr()
3389 return SelectInst::Create(IsNeg, NegA, A); in canonicalizeAbs()
[all …]
H A DInstCombineShifts.cpp391 if (SelectInst *SI = dyn_cast<SelectInst>(Op1)) in commonShiftTransforms()
553 SelectInst *SI = cast<SelectInst>(I); in canEvaluateShifted()
805 return SelectInst::Create(Cond, NewOp, NewShift); in FoldShiftByConstant()
822 return SelectInst::Create(Cond, NewShift, NewOp); in FoldShiftByConstant()
1045 return SelectInst::Create(X, NewC, ConstantInt::getNullValue(Ty)); in visitShl()
1160 return SelectInst::Create(X, NewC, ConstantInt::getNullValue(Ty)); in visitLShr()
/llvm-project-15.0.7/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.cpp413 SmallVector<SelectInst *, 8> RetSelects;
700 SelectInst *SI = SelectInst::Create( in eliminateCall()
773 SelectInst *SI = SelectInst::Create( in cleanupAndFinalize()
783 for (SelectInst *SI : RetSelects) { in cleanupAndFinalize()
H A DJumpThreading.cpp943 if (SelectInst *SI = dyn_cast<SelectInst>(I)) { in computeValueKnownInPredecessorsImpl()
2718 SelectInst *SI, PHINode *SIUse, in unfoldSelectInstr()
2761 SelectInst *PredSI = dyn_cast<SelectInst>(CondPHI->getIncomingValue(I)); in tryToUnfoldSelect()
2802 SelectInst *SI = dyn_cast<SelectInst>(CondLHS->getIncomingValue(I)); in tryToUnfoldSelect()
2870 auto isUnfoldCandidate = [BB](SelectInst *SI, Value *V) { in tryToUnfoldSelectInCurrBB()
2881 SelectInst *SI = nullptr; in tryToUnfoldSelectInCurrBB()
2888 if (SelectInst *SelectI = dyn_cast<SelectInst>(Cmp->user_back())) in tryToUnfoldSelectInCurrBB()
2893 } else if (SelectInst *SelectI = dyn_cast<SelectInst>(U.getUser())) { in tryToUnfoldSelectInCurrBB()
H A DLowerExpectIntrinsic.cpp369 if (SelectInst *SI = dyn_cast<SelectInst>(&Inst)) { in lowerExpectIntrinsic()
H A DRewriteStatepointsForGC.cpp506 assert((isa<SelectInst>(I) || isa<PHINode>(I)) && in findBaseDefiningValueOfVector()
685 assert((isa<SelectInst>(I) || isa<PHINode>(I)) && in findBaseDefiningValue()
725 return !isa<PHINode>(V) && !isa<SelectInst>(V) && in isOriginalBaseResult()
903 return isa<PHINode>(BDV) || isa<SelectInst>(BDV) || in findBasePointer()
928 } else if (SelectInst *SI = dyn_cast<SelectInst>(BDV)) { in findBasePointer()
1149 } else if (isa<SelectInst>(I)) { in findBasePointer()
1255 } else if (SelectInst *BaseSI = in findBasePointer()
1256 dyn_cast<SelectInst>(State.getBaseValue())) { in findBasePointer()
1257 SelectInst *SI = cast<SelectInst>(BDV); in findBasePointer()
/llvm-project-15.0.7/llvm/lib/Target/Hexagon/
H A DHexagonLoopIdiomRecognition.cpp623 bool matchRightShift(SelectInst *SelI, ParsedValues &PV);
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()
1679 if (SelectInst *Sel1 = dyn_cast<SelectInst>(Sel->getFalseValue())) { in setupPreSimplifier()
1828 SelectInst *SI = dyn_cast<SelectInst>(&In); in recognize()
1834 SelectInst *SelI = (T && isa<SelectInst>(T)) ? cast<SelectInst>(T) : SI; in recognize()
1863 SelectInst *SI = dyn_cast<SelectInst>(&In); in recognize()
1868 SelectInst *SelI = dyn_cast_or_null<SelectInst>(T); in recognize()
[all …]
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DIVDescriptors.cpp369 if (!Cur->isCommutative() && !IsAPhi && !isa<SelectInst>(Cur) && 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()
725 SelectInst *SI = dyn_cast<SelectInst>(I); in isConditionalRdxPattern()
[all …]
H A DBasicAliasAnalysis.cpp713 if (const SelectInst *SI = dyn_cast<SelectInst>(V)) { in pointsToConstantMemory()
1351 BasicAAResult::aliasSelect(const SelectInst *SI, LocationSize SISize, in aliasSelect()
1356 if (const SelectInst *SI2 = dyn_cast<SelectInst>(V2)) in aliasSelect()
1718 if (const SelectInst *S1 = dyn_cast<SelectInst>(V1)) { in aliasCheckRecursive()
1722 } else if (const SelectInst *S2 = dyn_cast<SelectInst>(V2)) { in aliasCheckRecursive()
/llvm-project-15.0.7/llvm/include/llvm/Analysis/
H A DMemoryBuiltins.h47 class SelectInst; variable
230 SizeOffsetType visitSelectInst(SelectInst &I);
303 SizeOffsetEvalType visitSelectInst(SelectInst &I);
H A DBasicAliasAnalysis.h33 class SelectInst; variable
146 AliasResult aliasSelect(const SelectInst *SI, LocationSize SISize,
/llvm-project-15.0.7/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()
580 static SelectInst *findSelectThroughCast(Value *V, CastInst *&Cast) { in findSelectThroughCast()
582 if (SelectInst *Sel = dyn_cast<SelectInst>(V)) in findSelectThroughCast()
586 if (SelectInst *Sel = dyn_cast<SelectInst>(Cast->getOperand(0))) in findSelectThroughCast()
602 SelectInst *Sel = findSelectThroughCast(BO.getOperand(0), CastOp); in foldBinOpIntoSelect()
1373 bool AMDGPUCodeGenPrepare::visitSelectInst(SelectInst &I) { in visitSelectInst()
/llvm-project-15.0.7/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