Lines Matching refs:SelectInst
55 static Instruction *foldSelectBinOpIdentity(SelectInst &Sel, in foldSelectBinOpIdentity()
121 static Value *foldSelectICmpAnd(SelectInst &Sel, ICmpInst *Cmp, in foldSelectICmpAnd()
264 Instruction *InstCombinerImpl::foldSelectOpOp(SelectInst &SI, Instruction *TI, in foldSelectOpOp()
504 Instruction *InstCombinerImpl::foldSelectIntoOp(SelectInst &SI, Value *TrueVal, in foldSelectIntoOp()
508 auto TryFoldSelectIntoOp = [&](SelectInst &SI, Value *TrueVal, in foldSelectIntoOp()
802 static Instruction *foldSetClearBits(SelectInst &Sel, in foldSetClearBits()
842 static Instruction *foldSelectZeroOrMul(SelectInst &SI, InstCombinerImpl &IC) { in foldSelectZeroOrMul()
1264 Instruction *InstCombinerImpl::foldSelectValueEquivalence(SelectInst &Sel, in foldSelectValueEquivalence()
1356 static Value *canonicalizeClampLike(SelectInst &Sel0, ICmpInst &Cmp0, in canonicalizeClampLike()
1372 if (!isa<SelectInst>(Sel1)) { in canonicalizeClampLike()
1534 tryToReuseConstantFromSelectInComparison(SelectInst &Sel, ICmpInst &Cmp, in tryToReuseConstantFromSelectInComparison()
1630 static Value *foldSelectInstWithICmpConst(SelectInst &SI, ICmpInst *ICI, in foldSelectInstWithICmpConst()
1680 Instruction *InstCombinerImpl::foldSelectInstWithICmp(SelectInst &SI, in foldSelectInstWithICmp()
1831 const SelectInst &SI) { in canSelectOperandBeMappingIntoPredBlock()
1879 static Instruction *foldAddSubSelect(SelectInst &SI, in foldAddSubSelect()
1955 foldOverflowingAddSubSelect(SelectInst &SI, InstCombiner::BuilderTy &Builder) { in foldOverflowingAddSubSelect()
2069 Instruction *InstCombinerImpl::foldSelectExtConst(SelectInst &Sel) { in foldSelectExtConst()
2114 static Instruction *canonicalizeSelectToShuffle(SelectInst &SI) { in canonicalizeSelectToShuffle()
2153 static Instruction *canonicalizeScalarSelectOfVecs(SelectInst &Sel, in canonicalizeScalarSelectOfVecs()
2174 static Instruction *foldSelectCmpBitcasts(SelectInst &Sel, in foldSelectCmpBitcasts()
2241 static Value *foldSelectCmpXchg(SelectInst &SI) { in foldSelectCmpXchg()
2258 if (auto *Select = dyn_cast<SelectInst>(SI.user_back())) in foldSelectCmpXchg()
2294 static Instruction *foldSelectFunnelShift(SelectInst &Sel, in foldSelectFunnelShift()
2365 static Instruction *foldSelectToCopysign(SelectInst &Sel, in foldSelectToCopysign()
2411 Instruction *InstCombinerImpl::foldVectorSelect(SelectInst &Sel) { in foldVectorSelect()
2496 static Instruction *foldSelectToPhiImpl(SelectInst &Sel, BasicBlock *BB, in foldSelectToPhiImpl()
2557 static Instruction *foldSelectToPhi(SelectInst &Sel, const DominatorTree &DT, in foldSelectToPhi()
2578 static Instruction *foldSelectWithSRem(SelectInst &SI, InstCombinerImpl &IC, in foldSelectWithSRem()
2627 static Value *foldSelectWithFrozenICmp(SelectInst &Sel, InstCombiner::BuilderTy &Builder) { in foldSelectWithFrozenICmp()
2654 SelectInst &SI, in foldAndOrOfSelectUsingImpliedCond()
2675 return SelectInst::Create(Op, A, Zero); in foldAndOrOfSelectUsingImpliedCond()
2680 return SelectInst::Create(Op, One, A); in foldAndOrOfSelectUsingImpliedCond()
2686 return SelectInst::Create(Op, B, Zero); in foldAndOrOfSelectUsingImpliedCond()
2691 return SelectInst::Create(Op, One, B); in foldAndOrOfSelectUsingImpliedCond()
2697 static Instruction *foldSelectWithFCmpToFabs(SelectInst &SI, in foldSelectWithFCmpToFabs()
2793 foldRoundUpIntegerWithPow2Alignment(SelectInst &SI, in foldRoundUpIntegerWithPow2Alignment()
2866 static Instruction *foldNestedSelects(SelectInst &OuterSelVal, in foldNestedSelects()
2932 return SelectInst::Create(InnerSel.Cond, in foldNestedSelects()
2937 Instruction *InstCombinerImpl::foldSelectOfBools(SelectInst &SI) { in foldSelectOfBools()
2973 bool CondLogicAnd = isa<SelectInst>(CondVal); in foldSelectOfBools()
2974 bool FalseLogicAnd = isa<SelectInst>(FalseVal); in foldSelectOfBools()
2982 return SelectInst::Create(Common, InnerSel, Zero); in foldSelectOfBools()
3014 bool CondLogicOr = isa<SelectInst>(CondVal); in foldSelectOfBools()
3015 bool TrueLogicOr = isa<SelectInst>(TrueVal); in foldSelectOfBools()
3023 return SelectInst::Create(Common, One, InnerSel); in foldSelectOfBools()
3044 return SelectInst::Create(NotCond, FalseVal, Zero); in foldSelectOfBools()
3049 return SelectInst::Create(NotCond, One, TrueVal); in foldSelectOfBools()
3084 return SelectInst::Create(TrueVal, OrV, Zero); in foldSelectOfBools()
3090 return SelectInst::Create(FalseVal, OrV, Zero); in foldSelectOfBools()
3097 return SelectInst::Create(TrueVal, One, AndV); in foldSelectOfBools()
3104 return SelectInst::Create(FalseVal, One, AndV); in foldSelectOfBools()
3118 if (auto *Op1SI = dyn_cast<SelectInst>(Op1)) in foldSelectOfBools()
3170 auto *SelCond = dyn_cast<SelectInst>(CondVal); in foldSelectOfBools()
3171 auto *SelFVal = dyn_cast<SelectInst>(FalseVal); in foldSelectOfBools()
3177 return SelectInst::Create(C, A, B); in foldSelectOfBools()
3186 auto *SelCond = dyn_cast<SelectInst>(CondVal); in foldSelectOfBools()
3187 auto *SelFVal = dyn_cast<SelectInst>(FalseVal); in foldSelectOfBools()
3193 return SelectInst::Create(C, B, A); in foldSelectOfBools()
3296 static Instruction *foldBitCeil(SelectInst &SI, IRBuilderBase &Builder) { in foldBitCeil()
3363 Instruction *InstCombinerImpl::visitSelectInst(SelectInst &SI) { in visitSelectInst()
3631 if (SelectInst *TrueSI = dyn_cast<SelectInst>(TrueVal)) { in visitSelectInst()
3651 if (SelectInst *FalseSI = dyn_cast<SelectInst>(FalseVal)) { in visitSelectInst()
3677 if (auto *TrueBOSI = dyn_cast<SelectInst>(TrueBO->getOperand(0))) { in visitSelectInst()
3684 if (auto *TrueBOSI = dyn_cast<SelectInst>(TrueBO->getOperand(1))) { in visitSelectInst()
3696 if (auto *FalseBOSI = dyn_cast<SelectInst>(FalseBO->getOperand(0))) { in visitSelectInst()
3703 if (auto *FalseBOSI = dyn_cast<SelectInst>(FalseBO->getOperand(1))) { in visitSelectInst()
3821 return SelectInst::Create(A, IsAnd ? V : TrueVal, IsAnd ? FalseVal : V); in visitSelectInst()
3827 return SelectInst::Create(A, IsAnd ? V : TrueVal, in visitSelectInst()