Lines Matching refs:SelectInst

55 static Instruction *foldSelectBinOpIdentity(SelectInst &Sel,
122 static Value *foldSelectICmpAnd(SelectInst &Sel, ICmpInst *Cmp,
271 Instruction *InstCombinerImpl::foldSelectOpOp(SelectInst &SI, Instruction *TI,
510 Instruction *InstCombinerImpl::foldSelectIntoOp(SelectInst &SI, Value *TrueVal,
514 auto TryFoldSelectIntoOp = [&](SelectInst &SI, Value *TrueVal,
818 static Instruction *foldSetClearBits(SelectInst &Sel,
858 static Instruction *foldSelectZeroOrMul(SelectInst &SI, InstCombinerImpl &IC) {
1286 Instruction *InstCombinerImpl::foldSelectValueEquivalence(SelectInst &Sel,
1393 static Value *canonicalizeClampLike(SelectInst &Sel0, ICmpInst &Cmp0,
1410 if (!isa<SelectInst>(Sel1)) {
1572 tryToReuseConstantFromSelectInComparison(SelectInst &Sel, ICmpInst &Cmp,
1668 static Value *foldSelectInstWithICmpConst(SelectInst &SI, ICmpInst *ICI,
1717 static Instruction *foldSelectICmpEq(SelectInst &SI, ICmpInst *ICI,
1820 /// Visit a SelectInst that has an ICmpInst as its first operand.
1821 Instruction *InstCombinerImpl::foldSelectInstWithICmp(SelectInst &SI,
1975 const SelectInst &SI) {
2023 static Instruction *foldAddSubSelect(SelectInst &SI,
2099 foldOverflowingAddSubSelect(SelectInst &SI, InstCombiner::BuilderTy &Builder) {
2213 Instruction *InstCombinerImpl::foldSelectExtConst(SelectInst &Sel) {
2258 static Instruction *canonicalizeSelectToShuffle(SelectInst &SI) {
2297 static Instruction *canonicalizeScalarSelectOfVecs(SelectInst &Sel,
2318 static Instruction *foldSelectCmpBitcasts(SelectInst &Sel,
2385 static Value *foldSelectCmpXchg(SelectInst &SI) {
2402 if (auto *Select = dyn_cast<SelectInst>(SI.user_back()))
2438 static Instruction *foldSelectFunnelShift(SelectInst &Sel,
2509 static Instruction *foldSelectToCopysign(SelectInst &Sel,
2552 Instruction *InstCombinerImpl::foldVectorSelect(SelectInst &Sel) {
2637 static Instruction *foldSelectToPhiImpl(SelectInst &Sel, BasicBlock *BB,
2698 static Instruction *foldSelectToPhi(SelectInst &Sel, const DominatorTree &DT,
2719 static Instruction *foldSelectWithSRem(SelectInst &SI, InstCombinerImpl &IC,
2768 static Value *foldSelectWithFrozenICmp(SelectInst &Sel, InstCombiner::BuilderTy &Builder) {
2795 static Value *simplifyNestedSelectsUsingImpliedCond(SelectInst &SI,
2810 SelectInst &SI,
2817 return SelectInst::Create(Op,
2825 static Instruction *foldSelectWithFCmpToFabs(SelectInst &SI,
2951 foldRoundUpIntegerWithPow2Alignment(SelectInst &SI,
3023 foldSelectOfSymmetricSelect(SelectInst &OuterSelVal,
3041 return SelectInst::Create(Xor, InnerFalseVal, InnerTrueVal);
3051 static Instruction *foldNestedSelects(SelectInst &OuterSelVal,
3117 return SelectInst::Create(InnerSel.Cond,
3122 Instruction *InstCombinerImpl::foldSelectOfBools(SelectInst &SI) {
3165 bool CondLogicAnd = isa<SelectInst>(CondVal);
3166 bool FalseLogicAnd = isa<SelectInst>(FalseVal);
3174 return SelectInst::Create(Common, InnerSel, Zero);
3213 bool CondLogicOr = isa<SelectInst>(CondVal);
3214 bool TrueLogicOr = isa<SelectInst>(TrueVal);
3222 return SelectInst::Create(Common, One, InnerSel);
3243 return SelectInst::Create(NotCond, FalseVal, Zero);
3248 return SelectInst::Create(NotCond, One, TrueVal);
3283 return SelectInst::Create(TrueVal, OrV, Zero);
3289 return SelectInst::Create(FalseVal, OrV, Zero);
3296 return SelectInst::Create(TrueVal, One, AndV);
3303 return SelectInst::Create(FalseVal, One, AndV);
3364 auto *SelCond = dyn_cast<SelectInst>(CondVal);
3365 auto *SelFVal = dyn_cast<SelectInst>(FalseVal);
3371 return SelectInst::Create(C, A, B);
3380 auto *SelCond = dyn_cast<SelectInst>(CondVal);
3381 auto *SelFVal = dyn_cast<SelectInst>(FalseVal);
3387 return SelectInst::Create(C, B, A);
3490 static Instruction *foldBitCeil(SelectInst &SI, IRBuilderBase &Builder) {
3584 Instruction *InstCombinerImpl::visitSelectInst(SelectInst &SI) {
3851 if (SelectInst *TrueSI = dyn_cast<SelectInst>(TrueVal)) {
3871 if (SelectInst *FalseSI = dyn_cast<SelectInst>(FalseVal)) {
3897 if (auto *TrueBOSI = dyn_cast<SelectInst>(TrueBO->getOperand(0))) {
3904 if (auto *TrueBOSI = dyn_cast<SelectInst>(TrueBO->getOperand(1))) {
3916 if (auto *FalseBOSI = dyn_cast<SelectInst>(FalseBO->getOperand(0))) {
3923 if (auto *FalseBOSI = dyn_cast<SelectInst>(FalseBO->getOperand(1))) {
4044 return SelectInst::Create(A, IsAnd ? V : TrueVal, IsAnd ? FalseVal : V);
4050 return SelectInst::Create(A, IsAnd ? V : TrueVal,