• Home
  • Raw
  • Download

Lines Matching refs:V2

693                                               Constant *V1, Constant *V2) {  in ConstantFoldSelectInstruction()  argument
695 return CB->getZExtValue() ? V1 : V2; in ConstantFoldSelectInstruction()
698 if (Cond->isNullValue()) return V2; in ConstantFoldSelectInstruction()
706 ConstantVector *CP2 = dyn_cast<ConstantVector>(V2); in ConstantFoldSelectInstruction()
709 (CP2 || isa<ConstantAggregateZero>(V2))) { in ConstantFoldSelectInstruction()
735 return V2; in ConstantFoldSelectInstruction()
737 if (isa<UndefValue>(V1)) return V2; in ConstantFoldSelectInstruction()
738 if (isa<UndefValue>(V2)) return V1; in ConstantFoldSelectInstruction()
739 if (V1 == V2) return V1; in ConstantFoldSelectInstruction()
744 return ConstantExpr::getSelect(Cond, TrueVal->getOperand(1), V2); in ConstantFoldSelectInstruction()
746 if (ConstantExpr *FalseVal = dyn_cast<ConstantExpr>(V2)) { in ConstantFoldSelectInstruction()
846 Constant *V2, in ConstantFoldShuffleVectorInstruction() argument
868 InElt = GetVectorElement(V2, Elt - SrcNumElts); in ConstantFoldShuffleVectorInstruction()
1529 static FCmpInst::Predicate evaluateFCmpRelation(Constant *V1, Constant *V2) { in evaluateFCmpRelation() argument
1530 assert(V1->getType() == V2->getType() && in evaluateFCmpRelation()
1538 if (V1 == V2) return FCmpInst::FCMP_OEQ; in evaluateFCmpRelation()
1541 if (!isa<ConstantExpr>(V2)) { in evaluateFCmpRelation()
1545 ConstantExpr::getFCmp(FCmpInst::FCMP_OEQ, V1, V2)); in evaluateFCmpRelation()
1549 ConstantExpr::getFCmp(FCmpInst::FCMP_OLT, V1, V2)); in evaluateFCmpRelation()
1553 ConstantExpr::getFCmp(FCmpInst::FCMP_OGT, V1, V2)); in evaluateFCmpRelation()
1562 FCmpInst::Predicate SwappedRelation = evaluateFCmpRelation(V2, V1); in evaluateFCmpRelation()
1597 static ICmpInst::Predicate evaluateICmpRelation(Constant *V1, Constant *V2, in evaluateICmpRelation() argument
1599 assert(V1->getType() == V2->getType() && in evaluateICmpRelation()
1601 if (V1 == V2) return ICmpInst::ICMP_EQ; in evaluateICmpRelation()
1605 if (!isa<GlobalValue>(V2) && !isa<ConstantExpr>(V2) && in evaluateICmpRelation()
1606 !isa<BlockAddress>(V2)) { in evaluateICmpRelation()
1611 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2)); in evaluateICmpRelation()
1615 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2)); in evaluateICmpRelation()
1619 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2)); in evaluateICmpRelation()
1629 evaluateICmpRelation(V2, V1, isSigned); in evaluateICmpRelation()
1634 if (isa<ConstantExpr>(V2)) { // Swap as necessary. in evaluateICmpRelation()
1636 evaluateICmpRelation(V2, V1, isSigned); in evaluateICmpRelation()
1645 if (const GlobalValue *GV2 = dyn_cast<GlobalValue>(V2)) { in evaluateICmpRelation()
1650 } else if (isa<BlockAddress>(V2)) { in evaluateICmpRelation()
1653 assert(isa<ConstantPointerNull>(V2) && "Canonicalization guarantee!"); in evaluateICmpRelation()
1660 if (isa<ConstantExpr>(V2)) { // Swap as necessary. in evaluateICmpRelation()
1662 evaluateICmpRelation(V2, V1, isSigned); in evaluateICmpRelation()
1671 if (const BlockAddress *BA2 = dyn_cast<BlockAddress>(V2)) { in evaluateICmpRelation()
1679 assert((isa<ConstantPointerNull>(V2) || isa<GlobalValue>(V2)) && in evaluateICmpRelation()
1704 if (V2->isNullValue() && in evaluateICmpRelation()
1717 if (isa<ConstantPointerNull>(V2)) { in evaluateICmpRelation()
1740 } else if (const GlobalValue *GV2 = dyn_cast<GlobalValue>(V2)) { in evaluateICmpRelation()
1767 ConstantExpr *CE2 = cast<ConstantExpr>(V2); in evaluateICmpRelation()
1904 APInt V2 = cast<ConstantInt>(C2)->getValue(); in ConstantFoldCompareInstruction() local
1907 case ICmpInst::ICMP_EQ: return ConstantInt::get(ResultTy, V1 == V2); in ConstantFoldCompareInstruction()
1908 case ICmpInst::ICMP_NE: return ConstantInt::get(ResultTy, V1 != V2); in ConstantFoldCompareInstruction()
1909 case ICmpInst::ICMP_SLT: return ConstantInt::get(ResultTy, V1.slt(V2)); in ConstantFoldCompareInstruction()
1910 case ICmpInst::ICMP_SGT: return ConstantInt::get(ResultTy, V1.sgt(V2)); in ConstantFoldCompareInstruction()
1911 case ICmpInst::ICMP_SLE: return ConstantInt::get(ResultTy, V1.sle(V2)); in ConstantFoldCompareInstruction()
1912 case ICmpInst::ICMP_SGE: return ConstantInt::get(ResultTy, V1.sge(V2)); in ConstantFoldCompareInstruction()
1913 case ICmpInst::ICMP_ULT: return ConstantInt::get(ResultTy, V1.ult(V2)); in ConstantFoldCompareInstruction()
1914 case ICmpInst::ICMP_UGT: return ConstantInt::get(ResultTy, V1.ugt(V2)); in ConstantFoldCompareInstruction()
1915 case ICmpInst::ICMP_ULE: return ConstantInt::get(ResultTy, V1.ule(V2)); in ConstantFoldCompareInstruction()
1916 case ICmpInst::ICMP_UGE: return ConstantInt::get(ResultTy, V1.uge(V2)); in ConstantFoldCompareInstruction()