Lines Matching refs:pred

1018           // cmp pred ^ true -> cmp !pred
1020 CmpInst::Predicate pred = (CmpInst::Predicate)CE1->getPredicate();
1021 pred = CmpInst::getInversePredicate(pred);
1022 return ConstantExpr::getCompare(pred, CE1->getOperand(0),
1350 ICmpInst::Predicate pred = ICmpInst::ICMP_EQ;
1351 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2));
1353 return pred;
1354 pred = isSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT;
1355 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2));
1357 return pred;
1358 pred = isSigned ? ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT;
1359 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2));
1361 return pred;
1572 Constant *llvm::ConstantFoldCompareInstruction(unsigned short pred,
1582 if (pred == FCmpInst::FCMP_FALSE)
1585 if (pred == FCmpInst::FCMP_TRUE)
1593 if (ICmpInst::isEquality(ICmpInst::Predicate(pred)) ||
1598 return ConstantInt::get(ResultTy, CmpInst::isTrueWhenEqual(pred));
1606 if (pred == ICmpInst::ICMP_EQ)
1608 else if (pred == ICmpInst::ICMP_NE)
1616 if (pred == ICmpInst::ICMP_EQ)
1618 else if (pred == ICmpInst::ICMP_NE)
1625 switch(pred) {
1640 switch (pred) {
1657 switch (pred) {
1708 ResElts.push_back(ConstantExpr::getCompare(pred, C1E, C2E));
1731 Result = (pred == FCmpInst::FCMP_UEQ || pred == FCmpInst::FCMP_OEQ ||
1732 pred == FCmpInst::FCMP_ULE || pred == FCmpInst::FCMP_OLE ||
1733 pred == FCmpInst::FCMP_UGE || pred == FCmpInst::FCMP_OGE);
1736 Result = (pred == FCmpInst::FCMP_UNE || pred == FCmpInst::FCMP_ONE ||
1737 pred == FCmpInst::FCMP_ULT || pred == FCmpInst::FCMP_OLT ||
1738 pred == FCmpInst::FCMP_ULE || pred == FCmpInst::FCMP_OLE);
1741 Result = (pred == FCmpInst::FCMP_UNE || pred == FCmpInst::FCMP_ONE ||
1742 pred == FCmpInst::FCMP_UGT || pred == FCmpInst::FCMP_OGT ||
1743 pred == FCmpInst::FCMP_UGE || pred == FCmpInst::FCMP_OGE);
1747 if (pred == FCmpInst::FCMP_UGT || pred == FCmpInst::FCMP_OGT)
1749 else if (pred == FCmpInst::FCMP_ULT || pred == FCmpInst::FCMP_OLT)
1754 if (pred == FCmpInst::FCMP_ULT || pred == FCmpInst::FCMP_OLT)
1756 else if (pred == FCmpInst::FCMP_UGT || pred == FCmpInst::FCMP_OGT)
1761 if (pred == FCmpInst::FCMP_OEQ || pred == FCmpInst::FCMP_UEQ)
1763 else if (pred == FCmpInst::FCMP_ONE || pred == FCmpInst::FCMP_UNE)
1775 switch (evaluateICmpRelation(C1, C2, CmpInst::isSigned(pred))) {
1782 Result = ICmpInst::isTrueWhenEqual((ICmpInst::Predicate)pred);
1785 switch (pred) {
1793 switch (pred) {
1801 switch (pred) {
1809 switch (pred) {
1817 if (pred == ICmpInst::ICMP_UGT) Result = 0;
1818 if (pred == ICmpInst::ICMP_ULT || pred == ICmpInst::ICMP_ULE) Result = 1;
1821 if (pred == ICmpInst::ICMP_SGT) Result = 0;
1822 if (pred == ICmpInst::ICMP_SLT || pred == ICmpInst::ICMP_SLE) Result = 1;
1825 if (pred == ICmpInst::ICMP_ULT) Result = 0;
1826 if (pred == ICmpInst::ICMP_UGT || pred == ICmpInst::ICMP_UGE) Result = 1;
1829 if (pred == ICmpInst::ICMP_SLT) Result = 0;
1830 if (pred == ICmpInst::ICMP_SGT || pred == ICmpInst::ICMP_SGE) Result = 1;
1833 if (pred == ICmpInst::ICMP_EQ) Result = 0;
1834 if (pred == ICmpInst::ICMP_NE) Result = 1;
1850 return ConstantExpr::getICmp(pred, Inverse, CE2Op0);
1856 if ((CE1->getOpcode() == Instruction::SExt && ICmpInst::isSigned(pred)) ||
1857 (CE1->getOpcode() == Instruction::ZExt && !ICmpInst::isSigned(pred))){
1865 return ConstantExpr::getICmp(pred, CE1Inverse, C2Inverse);
1875 pred = ICmpInst::getSwappedPredicate((ICmpInst::Predicate)pred);
1876 return ConstantExpr::getICmp(pred, C2, C1);