Lines Matching refs:FalseVal
211 Value *FalseVal) { in FoldSelectIntoOp() argument
216 !isa<Constant>(FalseVal)) { in FoldSelectIntoOp()
219 if ((SFO & 1) && FalseVal == TVI->getOperand(0)) { in FoldSelectIntoOp()
221 } else if ((SFO & 2) && FalseVal == TVI->getOperand(1)) { in FoldSelectIntoOp()
235 FalseVal, NewSel); in FoldSelectIntoOp()
249 if (Instruction *FVI = dyn_cast<Instruction>(FalseVal)) { in FoldSelectIntoOp()
362 Value *FalseVal = SI.getFalseValue(); in visitSelectInstWithICmp() local
372 return ReplaceInstUsesWith(SI, FalseVal); in visitSelectInstWithICmp()
376 return ReplaceInstUsesWith(SI, FalseVal); in visitSelectInstWithICmp()
396 if ((CmpLHS == TrueVal && AdjustedRHS == FalseVal) || in visitSelectInstWithICmp()
397 (CmpLHS == FalseVal && AdjustedRHS == TrueVal)) in visitSelectInstWithICmp()
412 sextRHS == FalseVal) { in visitSelectInstWithICmp()
415 } else if (match(FalseVal, m_SExt(m_Specific(CmpLHS))) && in visitSelectInstWithICmp()
417 CmpLHS = FalseVal; in visitSelectInstWithICmp()
426 zextRHS == FalseVal) { in visitSelectInstWithICmp()
429 } else if (match(FalseVal, m_ZExt(m_Specific(CmpLHS))) && in visitSelectInstWithICmp()
431 CmpLHS = FalseVal; in visitSelectInstWithICmp()
442 std::swap(FalseVal, TrueVal); in visitSelectInstWithICmp()
447 SI.setOperand(2, FalseVal); in visitSelectInstWithICmp()
470 C2 = dyn_cast<ConstantInt>(FalseVal); in visitSelectInstWithICmp()
472 C1 = dyn_cast<ConstantInt>(FalseVal); in visitSelectInstWithICmp()
494 if (SimplifyWithOpReplaced(FalseVal, CmpLHS, CmpRHS, TD, TLI) == TrueVal || in visitSelectInstWithICmp()
495 SimplifyWithOpReplaced(FalseVal, CmpRHS, CmpLHS, TD, TLI) == TrueVal) in visitSelectInstWithICmp()
496 return ReplaceInstUsesWith(SI, FalseVal); in visitSelectInstWithICmp()
497 if (SimplifyWithOpReplaced(TrueVal, CmpLHS, CmpRHS, TD, TLI) == FalseVal || in visitSelectInstWithICmp()
498 SimplifyWithOpReplaced(TrueVal, CmpRHS, CmpLHS, TD, TLI) == FalseVal) in visitSelectInstWithICmp()
499 return ReplaceInstUsesWith(SI, FalseVal); in visitSelectInstWithICmp()
501 if (SimplifyWithOpReplaced(TrueVal, CmpLHS, CmpRHS, TD, TLI) == FalseVal || in visitSelectInstWithICmp()
502 SimplifyWithOpReplaced(TrueVal, CmpRHS, CmpLHS, TD, TLI) == FalseVal) in visitSelectInstWithICmp()
504 if (SimplifyWithOpReplaced(FalseVal, CmpLHS, CmpRHS, TD, TLI) == TrueVal || in visitSelectInstWithICmp()
505 SimplifyWithOpReplaced(FalseVal, CmpRHS, CmpLHS, TD, TLI) == TrueVal) in visitSelectInstWithICmp()
516 } else if (CmpLHS == FalseVal && Pred == ICmpInst::ICMP_NE) { in visitSelectInstWithICmp()
596 ConstantInt *FalseVal, in foldSelectICmpAnd() argument
615 if (!TrueVal->isZero() && !FalseVal->isZero()) { in foldSelectICmpAnd()
616 if ((TrueVal->getValue() - FalseVal->getValue()).isPowerOf2()) in foldSelectICmpAnd()
617 Offset = FalseVal; in foldSelectICmpAnd()
618 else if ((FalseVal->getValue() - TrueVal->getValue()).isPowerOf2()) in foldSelectICmpAnd()
626 FalseVal = ConstantInt::get(Builder->getContext(), in foldSelectICmpAnd()
627 FalseVal->getValue() - Offset->getValue()); in foldSelectICmpAnd()
633 !FalseVal->getValue().isPowerOf2())) in foldSelectICmpAnd()
638 ConstantInt *ValC = !TrueVal->isZero() ? TrueVal : FalseVal; in foldSelectICmpAnd()
664 Value *FalseVal = SI.getFalseValue(); in visitSelectInst() local
666 if (Value *V = SimplifySelectInst(CondVal, TrueVal, FalseVal, TD)) in visitSelectInst()
673 return BinaryOperator::CreateOr(CondVal, FalseVal); in visitSelectInst()
677 return BinaryOperator::CreateAnd(NotCond, FalseVal); in visitSelectInst()
678 } else if (ConstantInt *C = dyn_cast<ConstantInt>(FalseVal)) { in visitSelectInst()
691 return BinaryOperator::CreateOr(CondVal, FalseVal); in visitSelectInst()
692 else if (CondVal == FalseVal) in visitSelectInst()
698 return BinaryOperator::CreateAnd(TrueVal, FalseVal); in visitSelectInst()
699 else if (match(FalseVal, m_Not(m_Specific(CondVal)))) in visitSelectInst()
700 return BinaryOperator::CreateOr(TrueVal, FalseVal); in visitSelectInst()
705 if (ConstantInt *FalseValC = dyn_cast<ConstantInt>(FalseVal)) { in visitSelectInst()
732 if (FCI->getOperand(0) == TrueVal && FCI->getOperand(1) == FalseVal) { in visitSelectInst()
741 ((CFPf = dyn_cast<ConstantFP>(FalseVal)) && in visitSelectInst()
743 return ReplaceInstUsesWith(SI, FalseVal); in visitSelectInst()
753 ((CFPf = dyn_cast<ConstantFP>(FalseVal)) && in visitSelectInst()
759 } else if (FCI->getOperand(0) == FalseVal && FCI->getOperand(1) == TrueVal){ in visitSelectInst()
768 ((CFPf = dyn_cast<ConstantFP>(FalseVal)) && in visitSelectInst()
770 return ReplaceInstUsesWith(SI, FalseVal); in visitSelectInst()
780 ((CFPf = dyn_cast<ConstantFP>(FalseVal)) && in visitSelectInst()
795 if (Instruction *FI = dyn_cast<Instruction>(FalseVal)) in visitSelectInst()
854 if (Instruction *FoldI = FoldSelectIntoOp(SI, TrueVal, FalseVal)) in visitSelectInst()
882 CanSelectOperandBeMappingIntoPredBlock(FalseVal, SI)) in visitSelectInst()
894 if (SelectInst *FalseSI = dyn_cast<SelectInst>(FalseVal)) { in visitSelectInst()
905 SI.setOperand(1, FalseVal); in visitSelectInst()
934 Value *V = Builder->CreateShuffleVector(TrueVal, FalseVal, MaskVal); in visitSelectInst()
939 return ReplaceInstUsesWith(SI, FalseVal); in visitSelectInst()