Lines Matching refs:ICmpInst

1376 static ICmpInst::Predicate areGlobalsPotentiallyEqual(const GlobalValue *GV1,  in areGlobalsPotentiallyEqual()
1396 return ICmpInst::ICMP_NE; in areGlobalsPotentiallyEqual()
1397 return ICmpInst::BAD_ICMP_PREDICATE; in areGlobalsPotentiallyEqual()
1412 static ICmpInst::Predicate evaluateICmpRelation(Constant *V1, Constant *V2, in evaluateICmpRelation()
1416 if (V1 == V2) return ICmpInst::ICMP_EQ; in evaluateICmpRelation()
1425 ICmpInst::Predicate pred = ICmpInst::ICMP_EQ; in evaluateICmpRelation()
1429 pred = isSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT; in evaluateICmpRelation()
1433 pred = isSigned ? ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT; in evaluateICmpRelation()
1439 return ICmpInst::BAD_ICMP_PREDICATE; in evaluateICmpRelation()
1443 ICmpInst::Predicate SwappedRelation = in evaluateICmpRelation()
1445 if (SwappedRelation != ICmpInst::BAD_ICMP_PREDICATE) in evaluateICmpRelation()
1446 return ICmpInst::getSwappedPredicate(SwappedRelation); in evaluateICmpRelation()
1450 ICmpInst::Predicate SwappedRelation = in evaluateICmpRelation()
1452 if (SwappedRelation != ICmpInst::BAD_ICMP_PREDICATE) in evaluateICmpRelation()
1453 return ICmpInst::getSwappedPredicate(SwappedRelation); in evaluateICmpRelation()
1454 return ICmpInst::BAD_ICMP_PREDICATE; in evaluateICmpRelation()
1463 return ICmpInst::ICMP_NE; // Globals never equal labels. in evaluateICmpRelation()
1469 return ICmpInst::ICMP_NE; in evaluateICmpRelation()
1473 ICmpInst::Predicate SwappedRelation = in evaluateICmpRelation()
1475 if (SwappedRelation != ICmpInst::BAD_ICMP_PREDICATE) in evaluateICmpRelation()
1476 return ICmpInst::getSwappedPredicate(SwappedRelation); in evaluateICmpRelation()
1477 return ICmpInst::BAD_ICMP_PREDICATE; in evaluateICmpRelation()
1488 return ICmpInst::ICMP_NE; in evaluateICmpRelation()
1493 return ICmpInst::ICMP_NE; in evaluateICmpRelation()
1537 return isSigned ? ICmpInst::ICMP_SGE : ICmpInst::ICMP_UGE; in evaluateICmpRelation()
1541 return isSigned ? ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT; in evaluateICmpRelation()
1548 return isSigned ? ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT; in evaluateICmpRelation()
1550 return ICmpInst::ICMP_EQ; in evaluateICmpRelation()
1558 return isSigned ? ICmpInst::ICMP_SLE : ICmpInst::ICMP_ULE; in evaluateICmpRelation()
1562 return isSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT; in evaluateICmpRelation()
1572 return isSigned ? ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT; in evaluateICmpRelation()
1576 return ICmpInst::BAD_ICMP_PREDICATE; in evaluateICmpRelation()
1597 return ICmpInst::BAD_ICMP_PREDICATE; in evaluateICmpRelation()
1610 return ICmpInst::BAD_ICMP_PREDICATE; // Might be equal. in evaluateICmpRelation()
1618 case -1: return isSigned ? ICmpInst::ICMP_SLT:ICmpInst::ICMP_ULT; in evaluateICmpRelation()
1619 case 1: return isSigned ? ICmpInst::ICMP_SGT:ICmpInst::ICMP_UGT; in evaluateICmpRelation()
1620 case -2: return ICmpInst::BAD_ICMP_PREDICATE; in evaluateICmpRelation()
1628 return isSigned ? ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT; in evaluateICmpRelation()
1630 return ICmpInst::BAD_ICMP_PREDICATE; // Might be equal. in evaluateICmpRelation()
1636 return isSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT; in evaluateICmpRelation()
1638 return ICmpInst::BAD_ICMP_PREDICATE; // Might be equal. in evaluateICmpRelation()
1640 return ICmpInst::ICMP_EQ; in evaluateICmpRelation()
1650 return ICmpInst::BAD_ICMP_PREDICATE; in evaluateICmpRelation()
1672 bool isIntegerPredicate = ICmpInst::isIntPredicate(Predicate); in ConstantFoldCompareInstruction()
1676 if (ICmpInst::isEquality(Predicate) || (isIntegerPredicate && C1 == C2)) in ConstantFoldCompareInstruction()
1694 if (pred == ICmpInst::ICMP_EQ) in ConstantFoldCompareInstruction()
1696 else if (pred == ICmpInst::ICMP_NE) in ConstantFoldCompareInstruction()
1704 if (pred == ICmpInst::ICMP_EQ) in ConstantFoldCompareInstruction()
1706 else if (pred == ICmpInst::ICMP_NE) in ConstantFoldCompareInstruction()
1714 case ICmpInst::ICMP_EQ: in ConstantFoldCompareInstruction()
1718 case ICmpInst::ICMP_NE: in ConstantFoldCompareInstruction()
1730 case ICmpInst::ICMP_EQ: return ConstantInt::get(ResultTy, V1 == V2); in ConstantFoldCompareInstruction()
1731 case ICmpInst::ICMP_NE: return ConstantInt::get(ResultTy, V1 != V2); in ConstantFoldCompareInstruction()
1732 case ICmpInst::ICMP_SLT: return ConstantInt::get(ResultTy, V1.slt(V2)); in ConstantFoldCompareInstruction()
1733 case ICmpInst::ICMP_SGT: return ConstantInt::get(ResultTy, V1.sgt(V2)); in ConstantFoldCompareInstruction()
1734 case ICmpInst::ICMP_SLE: return ConstantInt::get(ResultTy, V1.sle(V2)); in ConstantFoldCompareInstruction()
1735 case ICmpInst::ICMP_SGE: return ConstantInt::get(ResultTy, V1.sge(V2)); in ConstantFoldCompareInstruction()
1736 case ICmpInst::ICMP_ULT: return ConstantInt::get(ResultTy, V1.ult(V2)); in ConstantFoldCompareInstruction()
1737 case ICmpInst::ICMP_UGT: return ConstantInt::get(ResultTy, V1.ugt(V2)); in ConstantFoldCompareInstruction()
1738 case ICmpInst::ICMP_ULE: return ConstantInt::get(ResultTy, V1.ule(V2)); in ConstantFoldCompareInstruction()
1739 case ICmpInst::ICMP_UGE: return ConstantInt::get(ResultTy, V1.uge(V2)); in ConstantFoldCompareInstruction()
1868 case ICmpInst::BAD_ICMP_PREDICATE: in ConstantFoldCompareInstruction()
1870 case ICmpInst::ICMP_EQ: // We know the constants are equal! in ConstantFoldCompareInstruction()
1873 Result = ICmpInst::isTrueWhenEqual((ICmpInst::Predicate)pred); in ConstantFoldCompareInstruction()
1875 case ICmpInst::ICMP_ULT: in ConstantFoldCompareInstruction()
1877 case ICmpInst::ICMP_ULT: case ICmpInst::ICMP_NE: case ICmpInst::ICMP_ULE: in ConstantFoldCompareInstruction()
1879 case ICmpInst::ICMP_UGT: case ICmpInst::ICMP_EQ: case ICmpInst::ICMP_UGE: in ConstantFoldCompareInstruction()
1883 case ICmpInst::ICMP_SLT: in ConstantFoldCompareInstruction()
1885 case ICmpInst::ICMP_SLT: case ICmpInst::ICMP_NE: case ICmpInst::ICMP_SLE: in ConstantFoldCompareInstruction()
1887 case ICmpInst::ICMP_SGT: case ICmpInst::ICMP_EQ: case ICmpInst::ICMP_SGE: in ConstantFoldCompareInstruction()
1891 case ICmpInst::ICMP_UGT: in ConstantFoldCompareInstruction()
1893 case ICmpInst::ICMP_UGT: case ICmpInst::ICMP_NE: case ICmpInst::ICMP_UGE: in ConstantFoldCompareInstruction()
1895 case ICmpInst::ICMP_ULT: case ICmpInst::ICMP_EQ: case ICmpInst::ICMP_ULE: in ConstantFoldCompareInstruction()
1899 case ICmpInst::ICMP_SGT: in ConstantFoldCompareInstruction()
1901 case ICmpInst::ICMP_SGT: case ICmpInst::ICMP_NE: case ICmpInst::ICMP_SGE: in ConstantFoldCompareInstruction()
1903 case ICmpInst::ICMP_SLT: case ICmpInst::ICMP_EQ: case ICmpInst::ICMP_SLE: in ConstantFoldCompareInstruction()
1907 case ICmpInst::ICMP_ULE: in ConstantFoldCompareInstruction()
1908 if (pred == ICmpInst::ICMP_UGT) Result = 0; in ConstantFoldCompareInstruction()
1909 if (pred == ICmpInst::ICMP_ULT || pred == ICmpInst::ICMP_ULE) Result = 1; in ConstantFoldCompareInstruction()
1911 case ICmpInst::ICMP_SLE: in ConstantFoldCompareInstruction()
1912 if (pred == ICmpInst::ICMP_SGT) Result = 0; in ConstantFoldCompareInstruction()
1913 if (pred == ICmpInst::ICMP_SLT || pred == ICmpInst::ICMP_SLE) Result = 1; in ConstantFoldCompareInstruction()
1915 case ICmpInst::ICMP_UGE: in ConstantFoldCompareInstruction()
1916 if (pred == ICmpInst::ICMP_ULT) Result = 0; in ConstantFoldCompareInstruction()
1917 if (pred == ICmpInst::ICMP_UGT || pred == ICmpInst::ICMP_UGE) Result = 1; in ConstantFoldCompareInstruction()
1919 case ICmpInst::ICMP_SGE: in ConstantFoldCompareInstruction()
1920 if (pred == ICmpInst::ICMP_SLT) Result = 0; in ConstantFoldCompareInstruction()
1921 if (pred == ICmpInst::ICMP_SGT || pred == ICmpInst::ICMP_SGE) Result = 1; in ConstantFoldCompareInstruction()
1923 case ICmpInst::ICMP_NE: in ConstantFoldCompareInstruction()
1924 if (pred == ICmpInst::ICMP_EQ) Result = 0; in ConstantFoldCompareInstruction()
1925 if (pred == ICmpInst::ICMP_NE) Result = 1; in ConstantFoldCompareInstruction()
1947 if ((CE1->getOpcode() == Instruction::SExt && ICmpInst::isSigned(pred)) || in ConstantFoldCompareInstruction()
1948 (CE1->getOpcode() == Instruction::ZExt && !ICmpInst::isSigned(pred))){ in ConstantFoldCompareInstruction()
1966 pred = ICmpInst::getSwappedPredicate((ICmpInst::Predicate)pred); in ConstantFoldCompareInstruction()