• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/llvmCore-3425.0.34/lib/Analysis/

Lines Matching defs:Pred

78 /// isSameCompare - Is V equivalent to the comparison "LHS Pred RHS"?
79 static bool isSameCompare(Value *V, CmpInst::Predicate Pred, Value *LHS,
86 if (CPred == Pred && CLHS == LHS && CRHS == RHS)
88 return CPred == CmpInst::getSwappedPredicate(Pred) && CLHS == RHS &&
430 static Value *ThreadCmpOverSelect(CmpInst::Predicate Pred, Value *LHS,
440 Pred = CmpInst::getSwappedPredicate(Pred);
450 Value *TCmp = SimplifyCmpInst(Pred, TV, RHS, Q, MaxRecurse);
458 if (!isSameCompare(Cond, Pred, TV, RHS))
464 Value *FCmp = SimplifyCmpInst(Pred, FV, RHS, Q, MaxRecurse);
472 if (!isSameCompare(Cond, Pred, FV, RHS))
555 static Value *ThreadCmpOverPHI(CmpInst::Predicate Pred, Value *LHS, Value *RHS,
564 Pred = CmpInst::getSwappedPredicate(Pred);
579 Value *V = SimplifyCmpInst(Pred, Incoming, RHS, Q, MaxRecurse);
1575 /// equivalent to the comparison "LHS Pred RHS". Return such a value if found,
1577 static Value *ExtractEquivalentCondition(Value *V, CmpInst::Predicate Pred,
1586 if (Pred == Cmp->getPredicate() && LHS == CmpLHS && RHS == CmpRHS)
1588 if (Pred == CmpInst::getSwappedPredicate(Cmp->getPredicate()) &&
1595 CmpInst::Predicate Pred,
1598 switch (Pred) {
1615 Pred = ICmpInst::getSignedPredicate(Pred);
1631 return ConstantExpr::getICmp(Pred, LHSOffset, RHSOffset);
1638 CmpInst::Predicate Pred = (CmpInst::Predicate)Predicate;
1639 assert(CmpInst::isIntPredicate(Pred) && "Not an integer compare!");
1643 return ConstantFoldCompareInstOperands(Pred, CLHS, CRHS, Q.TD, Q.TLI);
1647 Pred = CmpInst::getSwappedPredicate(Pred);
1657 return ConstantInt::get(ITy, CmpInst::isTrueWhenEqual(Pred));
1661 switch (Pred) {
1706 return ConstantInt::get(ITy, CmpInst::isTrueWhenEqual(Pred));
1718 Pred == CmpInst::ICMP_EQ)
1727 Pred == CmpInst::ICMP_EQ)
1733 if (Pred == CmpInst::ICMP_EQ)
1735 else if (Pred == CmpInst::ICMP_NE)
1744 if (Pred == CmpInst::ICMP_EQ)
1746 else if (Pred == CmpInst::ICMP_NE)
1755 switch (Pred) {
1805 ConstantRange RHS_CR = ICmpInst::makeConstantRange(Pred, CI->getValue());
1883 if (Value *V = SimplifyICmpInst(Pred, SrcOp,
1890 if (Value *V = SimplifyICmpInst(Pred, SrcOp, RI->getOperand(0),
1902 if (Value *V = SimplifyICmpInst(ICmpInst::getUnsignedPredicate(Pred),
1918 if (Value *V = SimplifyICmpInst(ICmpInst::getUnsignedPredicate(Pred),
1925 switch (Pred) {
1962 if (Value *V = SimplifyICmpInst(Pred, SrcOp, RI->getOperand(0),
1977 if (Value *V = SimplifyICmpInst(Pred, SrcOp, Trunc, Q, MaxRecurse-1))
1983 switch (Pred) {
2039 NoLHSWrapProblem = ICmpInst::isEquality(Pred) ||
2040 (CmpInst::isUnsigned(Pred) && LBO->hasNoUnsignedWrap()) ||
2041 (CmpInst::isSigned(Pred) && LBO->hasNoSignedWrap());
2045 NoRHSWrapProblem = ICmpInst::isEquality(Pred) ||
2046 (CmpInst::isUnsigned(Pred) && RBO->hasNoUnsignedWrap()) ||
2047 (CmpInst::isSigned(Pred) && RBO->hasNoSignedWrap());
2052 if (Value *V = SimplifyICmpInst(Pred, A == RHS ? B : A,
2059 if (Value *V = SimplifyICmpInst(Pred,
2070 if (Value *V = SimplifyICmpInst(Pred, Y, Z, Q, MaxRecurse-1))
2077 switch (Pred) {
2104 switch (Pred) {
2133 if (Pred == ICmpInst::ICMP_UGT)
2135 if (Pred == ICmpInst::ICMP_ULE)
2145 if (ICmpInst::isSigned(Pred))
2152 if (Value *V = SimplifyICmpInst(Pred, LBO->getOperand(0),
2161 if (!NSW && ICmpInst::isSigned(Pred))
2163 if (Value *V = SimplifyICmpInst(Pred, LBO->getOperand(0),
2181 P = Pred;
2187 P = CmpInst::getSwappedPredicate(Pred);
2194 P = CmpInst::getSwappedPredicate(Pred);
2201 P = Pred;
2251 P = Pred;
2257 P = CmpInst::getSwappedPredicate(Pred);
2264 P = CmpInst::getSwappedPredicate(Pred);
2271 P = Pred;
2321 if (Pred == CmpInst::ICMP_SGE)
2324 if (Pred == CmpInst::ICMP_SLT)
2331 if (Pred == CmpInst::ICMP_SLE)
2334 if (Pred == CmpInst::ICMP_SGT)
2341 if (Pred == CmpInst::ICMP_UGE)
2344 if (Pred == CmpInst::ICMP_ULT)
2351 if (Pred == CmpInst::ICMP_ULE)
2354 if (Pred == CmpInst::ICMP_UGT)
2362 if (Constant *C = computePointerICmp(*Q.TD, Pred, LHS, RHS))
2369 (ICmpInst::isEquality(Pred) ||
2371 Pred == ICmpInst::getSignedPredicate(Pred)))) {
2381 return ConstantExpr::getICmp(Pred, NewLHS, NewRHS);
2389 if (Value *V = ThreadCmpOverSelect(Pred, LHS, RHS, Q, MaxRecurse))
2395 if (Value *V = ThreadCmpOverPHI(Pred, LHS, RHS, Q, MaxRecurse))
2413 CmpInst::Predicate Pred = (CmpInst::Predicate)Predicate;
2414 assert(CmpInst::isFPPredicate(Pred) && "Not an FP compare!");
2418 return ConstantFoldCompareInstOperands(Pred, CLHS, CRHS, Q.TD, Q.TLI);
2422 Pred = CmpInst::getSwappedPredicate(Pred);
2426 if (Pred == FCmpInst::FCMP_FALSE)
2428 if (Pred == FCmpInst::FCMP_TRUE)
2436 if (CmpInst::isTrueWhenEqual(Pred))
2438 if (CmpInst::isFalseWhenEqual(Pred))
2447 if (FCmpInst::isOrdered(Pred)) // True "if ordered and foo"
2449 assert(FCmpInst::isUnordered(Pred) &&
2457 switch (Pred) {
2468 switch (Pred) {
2486 if (Value *V = ThreadCmpOverSelect(Pred, LHS, RHS, Q, MaxRecurse))
2492 if (Value *V = ThreadCmpOverPHI(Pred, LHS, RHS, Q, MaxRecurse))