Lines Matching refs:ICmpInst
1328 /// predicate, otherwise return ICmpInst::BAD_ICMP_PREDICATE.
1335 static ICmpInst::Predicate evaluateICmpRelation(Constant *V1, Constant *V2,
1339 if (V1 == V2) return ICmpInst::ICMP_EQ;
1348 ICmpInst::Predicate pred = ICmpInst::ICMP_EQ;
1352 pred = isSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT;
1356 pred = isSigned ? ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT;
1362 return ICmpInst::BAD_ICMP_PREDICATE;
1366 ICmpInst::Predicate SwappedRelation =
1368 if (SwappedRelation != ICmpInst::BAD_ICMP_PREDICATE)
1369 return ICmpInst::getSwappedPredicate(SwappedRelation);
1373 ICmpInst::Predicate SwappedRelation =
1375 if (SwappedRelation != ICmpInst::BAD_ICMP_PREDICATE)
1376 return ICmpInst::getSwappedPredicate(SwappedRelation);
1377 return ICmpInst::BAD_ICMP_PREDICATE;
1387 return ICmpInst::ICMP_NE;
1389 return ICmpInst::ICMP_NE; // Globals never equal labels.
1395 return ICmpInst::ICMP_NE;
1399 ICmpInst::Predicate SwappedRelation =
1401 if (SwappedRelation != ICmpInst::BAD_ICMP_PREDICATE)
1402 return ICmpInst::getSwappedPredicate(SwappedRelation);
1403 return ICmpInst::BAD_ICMP_PREDICATE;
1414 return ICmpInst::ICMP_NE;
1419 return ICmpInst::ICMP_NE;
1462 return isSigned ? ICmpInst::ICMP_SGE : ICmpInst::ICMP_UGE;
1466 return isSigned ? ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT;
1473 return isSigned ? ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT;
1475 return ICmpInst::ICMP_EQ;
1483 return isSigned ? ICmpInst::ICMP_SLE : ICmpInst::ICMP_ULE;
1487 return isSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT;
1497 return isSigned ? ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT;
1500 return ICmpInst::BAD_ICMP_PREDICATE;
1516 return ICmpInst::BAD_ICMP_PREDICATE;
1528 return ICmpInst::BAD_ICMP_PREDICATE; // Might be equal.
1536 case -1: return isSigned ? ICmpInst::ICMP_SLT:ICmpInst::ICMP_ULT;
1537 case 1: return isSigned ? ICmpInst::ICMP_SGT:ICmpInst::ICMP_UGT;
1538 case -2: return ICmpInst::BAD_ICMP_PREDICATE;
1546 return isSigned ? ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT;
1548 return ICmpInst::BAD_ICMP_PREDICATE; // Might be equal.
1554 return isSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT;
1556 return ICmpInst::BAD_ICMP_PREDICATE; // Might be equal.
1558 return ICmpInst::ICMP_EQ;
1567 return ICmpInst::BAD_ICMP_PREDICATE;
1591 if (ICmpInst::isEquality(ICmpInst::Predicate(pred)) ||
1604 if (pred == ICmpInst::ICMP_EQ)
1606 else if (pred == ICmpInst::ICMP_NE)
1614 if (pred == ICmpInst::ICMP_EQ)
1616 else if (pred == ICmpInst::ICMP_NE)
1624 case ICmpInst::ICMP_EQ:
1628 case ICmpInst::ICMP_NE:
1640 case ICmpInst::ICMP_EQ: return ConstantInt::get(ResultTy, V1 == V2);
1641 case ICmpInst::ICMP_NE: return ConstantInt::get(ResultTy, V1 != V2);
1642 case ICmpInst::ICMP_SLT: return ConstantInt::get(ResultTy, V1.slt(V2));
1643 case ICmpInst::ICMP_SGT: return ConstantInt::get(ResultTy, V1.sgt(V2));
1644 case ICmpInst::ICMP_SLE: return ConstantInt::get(ResultTy, V1.sle(V2));
1645 case ICmpInst::ICMP_SGE: return ConstantInt::get(ResultTy, V1.sge(V2));
1646 case ICmpInst::ICMP_ULT: return ConstantInt::get(ResultTy, V1.ult(V2));
1647 case ICmpInst::ICMP_UGT: return ConstantInt::get(ResultTy, V1.ugt(V2));
1648 case ICmpInst::ICMP_ULE: return ConstantInt::get(ResultTy, V1.ule(V2));
1649 case ICmpInst::ICMP_UGE: return ConstantInt::get(ResultTy, V1.uge(V2));
1775 case ICmpInst::BAD_ICMP_PREDICATE:
1777 case ICmpInst::ICMP_EQ: // We know the constants are equal!
1780 Result = ICmpInst::isTrueWhenEqual((ICmpInst::Predicate)pred);
1782 case ICmpInst::ICMP_ULT:
1784 case ICmpInst::ICMP_ULT: case ICmpInst::ICMP_NE: case ICmpInst::ICMP_ULE:
1786 case ICmpInst::ICMP_UGT: case ICmpInst::ICMP_EQ: case ICmpInst::ICMP_UGE:
1790 case ICmpInst::ICMP_SLT:
1792 case ICmpInst::ICMP_SLT: case ICmpInst::ICMP_NE: case ICmpInst::ICMP_SLE:
1794 case ICmpInst::ICMP_SGT: case ICmpInst::ICMP_EQ: case ICmpInst::ICMP_SGE:
1798 case ICmpInst::ICMP_UGT:
1800 case ICmpInst::ICMP_UGT: case ICmpInst::ICMP_NE: case ICmpInst::ICMP_UGE:
1802 case ICmpInst::ICMP_ULT: case ICmpInst::ICMP_EQ: case ICmpInst::ICMP_ULE:
1806 case ICmpInst::ICMP_SGT:
1808 case ICmpInst::ICMP_SGT: case ICmpInst::ICMP_NE: case ICmpInst::ICMP_SGE:
1810 case ICmpInst::ICMP_SLT: case ICmpInst::ICMP_EQ: case ICmpInst::ICMP_SLE:
1814 case ICmpInst::ICMP_ULE:
1815 if (pred == ICmpInst::ICMP_UGT) Result = 0;
1816 if (pred == ICmpInst::ICMP_ULT || pred == ICmpInst::ICMP_ULE) Result = 1;
1818 case ICmpInst::ICMP_SLE:
1819 if (pred == ICmpInst::ICMP_SGT) Result = 0;
1820 if (pred == ICmpInst::ICMP_SLT || pred == ICmpInst::ICMP_SLE) Result = 1;
1822 case ICmpInst::ICMP_UGE:
1823 if (pred == ICmpInst::ICMP_ULT) Result = 0;
1824 if (pred == ICmpInst::ICMP_UGT || pred == ICmpInst::ICMP_UGE) Result = 1;
1826 case ICmpInst::ICMP_SGE:
1827 if (pred == ICmpInst::ICMP_SLT) Result = 0;
1828 if (pred == ICmpInst::ICMP_SGT || pred == ICmpInst::ICMP_SGE) Result = 1;
1830 case ICmpInst::ICMP_NE:
1831 if (pred == ICmpInst::ICMP_EQ) Result = 0;
1832 if (pred == ICmpInst::ICMP_NE) Result = 1;
1854 if ((CE1->getOpcode() == Instruction::SExt && ICmpInst::isSigned(pred)) ||
1855 (CE1->getOpcode() == Instruction::ZExt && !ICmpInst::isSigned(pred))){
1873 pred = ICmpInst::getSwappedPredicate((ICmpInst::Predicate)pred);