reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/Transforms/InstCombine/InstCombineSelect.cpp
 2191   Value *CondVal = SI.getCondition();
 2192   Value *TrueVal = SI.getTrueValue();
 2193   Value *FalseVal = SI.getFalseValue();
 2194   Type *SelType = SI.getType();
 2202     if (llvm::any_of(SI.users(), [&](User *U) {
 2213                                     SQ.getWithInstruction(&SI)))
 2214     return replaceInstUsesWith(SI, V);
 2216   if (Instruction *I = canonicalizeSelectToShuffle(SI))
 2219   if (Instruction *I = canonicalizeScalarSelectOfVecs(SI, Builder))
 2232     SI.setOperand(1, FalseVal);
 2233     SI.setOperand(2, TrueVal);
 2234     SI.swapProfMetadata();
 2236     return &SI;
 2320                                   SI.getName() + ".p");
 2338                                   SI.getName() + ".p");
 2358     return replaceInstUsesWith(SI, Fabs);
 2366     return replaceInstUsesWith(SI, Fabs);
 2379     return replaceInstUsesWith(SI, Fabs);
 2391     return replaceInstUsesWith(SI, Fabs);
 2396     if (Instruction *Result = foldSelectInstWithICmp(SI, ICI))
 2399   if (Instruction *Add = foldAddSubSelect(SI, Builder))
 2406     if (Instruction *IV = foldSelectOpOp(SI, TI, FI))
 2409   if (Instruction *I = foldSelectExtConst(SI))
 2414     if (Instruction *FoldI = foldSelectIntoOp(SI, TrueVal, FalseVal))
 2419     SelectPatternResult SPR = matchSelectPattern(&SI, LHS, RHS, &CastOp);
 2425                                           RHS2, SI, SPF, RHS))
 2429                                           RHS2, SI, SPF, LHS))
 2455               cast<FPMathOperator>(SI.getCondition())->getFastMathFlags();
 2460         Value *NewSI = Builder.CreateSelect(Cmp, LHS, RHS, SI.getName(), &SI);
 2460         Value *NewSI = Builder.CreateSelect(Cmp, LHS, RHS, SI.getName(), &SI);
 2462           return replaceInstUsesWith(SI, NewSI);
 2465         return replaceInstUsesWith(SI, NewCast);
 2482           if (MDNode *MD = SI.getMetadata(LLVMContext::MD_prof)) {
 2485             if (X == SI.getFalseValue() && Y == SI.getTrueValue())
 2485             if (X == SI.getFalseValue() && Y == SI.getTrueValue())
 2505       if (Instruction *I = matchSAddSubSat(SI))
 2512   if (isa<FPMathOperator>(SI) && SI.hasNoNaNs() && SI.hasNoSignedZeros()) {
 2512   if (isa<FPMathOperator>(SI) && SI.hasNoNaNs() && SI.hasNoSignedZeros()) {
 2512   if (isa<FPMathOperator>(SI) && SI.hasNoNaNs() && SI.hasNoSignedZeros()) {
 2514     if (match(&SI, m_OrdFMax(m_Value(X), m_Value(Y))))
 2516           SI, Builder.CreateBinaryIntrinsic(Intrinsic::maxnum, X, Y, &SI));
 2516           SI, Builder.CreateBinaryIntrinsic(Intrinsic::maxnum, X, Y, &SI));
 2518     if (match(&SI, m_OrdFMin(m_Value(X), m_Value(Y))))
 2520           SI, Builder.CreateBinaryIntrinsic(Intrinsic::minnum, X, Y, &SI));
 2520           SI, Builder.CreateBinaryIntrinsic(Intrinsic::minnum, X, Y, &SI));
 2524   if (auto *PN = dyn_cast<PHINode>(SI.getCondition()))
 2526     if (canSelectOperandBeMappingIntoPredBlock(TrueVal, SI) &&
 2527         canSelectOperandBeMappingIntoPredBlock(FalseVal, SI))
 2528       if (Instruction *NV = foldOpIntoPhi(SI, PN))
 2535         if (SI.getTrueValue() == TrueSI->getTrueValue())
 2537         SI.setOperand(1, TrueSI->getTrueValue());
 2538         return &SI;
 2545         SI.setOperand(0, And);
 2546         SI.setOperand(1, TrueSI->getTrueValue());
 2547         return &SI;
 2555         if (SI.getFalseValue() == FalseSI->getFalseValue())
 2557         SI.setOperand(2, FalseSI->getFalseValue());
 2558         return &SI;
 2563         SI.setOperand(0, Or);
 2564         SI.setOperand(2, FalseSI->getFalseValue());
 2565         return &SI;
 2593         return &SI;
 2600         return &SI;
 2613         return &SI;
 2620         return &SI;
 2627     SI.setOperand(0, NotCond);
 2628     SI.setOperand(1, FalseVal);
 2629     SI.setOperand(2, TrueVal);
 2630     SI.swapProfMetadata();
 2631     return &SI;
 2638     if (Value *V = SimplifyDemandedVectorElts(&SI, AllOnesEltMask, UndefElts)) {
 2639       if (V != &SI)
 2640         return replaceInstUsesWith(SI, V);
 2641       return &SI;
 2652     computeKnownBits(CondVal, Known, 0, &SI);
 2654       return replaceInstUsesWith(SI, TrueVal);
 2656       return replaceInstUsesWith(SI, FalseVal);
 2659   if (Instruction *BitCastSel = foldSelectCmpBitcasts(SI, Builder))
 2663   if (Instruction *Select = foldSelectCmpXchg(SI))
 2666   if (Instruction *Select = foldSelectBinOpIdentity(SI, TLI))
 2669   if (Instruction *Rot = foldSelectRotate(SI))