Lines Matching refs:FCmpInst
66 /// getFCmpCode - Similar to getICmpCode but for FCmpInst. This encodes a fcmp
69 static unsigned getFCmpCode(FCmpInst::Predicate CC, bool &isOrdered) {
72 case FCmpInst::FCMP_ORD: isOrdered = true; return 0; // 000
73 case FCmpInst::FCMP_UNO: return 0; // 000
74 case FCmpInst::FCMP_OGT: isOrdered = true; return 1; // 001
75 case FCmpInst::FCMP_UGT: return 1; // 001
76 case FCmpInst::FCMP_OEQ: isOrdered = true; return 2; // 010
77 case FCmpInst::FCMP_UEQ: return 2; // 010
78 case FCmpInst::FCMP_OGE: isOrdered = true; return 3; // 011
79 case FCmpInst::FCMP_UGE: return 3; // 011
80 case FCmpInst::FCMP_OLT: isOrdered = true; return 4; // 100
81 case FCmpInst::FCMP_ULT: return 4; // 100
82 case FCmpInst::FCMP_ONE: isOrdered = true; return 5; // 101
83 case FCmpInst::FCMP_UNE: return 5; // 101
84 case FCmpInst::FCMP_OLE: isOrdered = true; return 6; // 110
85 case FCmpInst::FCMP_ULE: return 6; // 110
114 case 0: Pred = isordered ? FCmpInst::FCMP_ORD : FCmpInst::FCMP_UNO; break;
115 case 1: Pred = isordered ? FCmpInst::FCMP_OGT : FCmpInst::FCMP_UGT; break;
116 case 2: Pred = isordered ? FCmpInst::FCMP_OEQ : FCmpInst::FCMP_UEQ; break;
117 case 3: Pred = isordered ? FCmpInst::FCMP_OGE : FCmpInst::FCMP_UGE; break;
118 case 4: Pred = isordered ? FCmpInst::FCMP_OLT : FCmpInst::FCMP_ULT; break;
119 case 5: Pred = isordered ? FCmpInst::FCMP_ONE : FCmpInst::FCMP_UNE; break;
120 case 6: Pred = isordered ? FCmpInst::FCMP_OLE : FCmpInst::FCMP_ULE; break;
123 Pred = FCmpInst::FCMP_ORD; break;
931 Value *InstCombiner::FoldAndOfFCmps(FCmpInst *LHS, FCmpInst *RHS) {
932 if (LHS->getPredicate() == FCmpInst::FCMP_ORD &&
933 RHS->getPredicate() == FCmpInst::FCMP_ORD) {
957 FCmpInst::Predicate Op0CC = LHS->getPredicate(), Op1CC = RHS->getPredicate();
962 Op1CC = FCmpInst::getSwappedPredicate(Op1CC);
969 return Builder->CreateFCmp((FCmpInst::Predicate)Op0CC, Op0LHS, Op0RHS);
970 if (Op0CC == FCmpInst::FCMP_FALSE || Op1CC == FCmpInst::FCMP_FALSE)
972 if (Op0CC == FCmpInst::FCMP_TRUE)
974 if (Op1CC == FCmpInst::FCMP_TRUE)
1195 if (FCmpInst *LHS = dyn_cast<FCmpInst>(I.getOperand(0)))
1196 if (FCmpInst *RHS = dyn_cast<FCmpInst>(I.getOperand(1)))
1226 if (FCmpInst *RHS = dyn_cast<FCmpInst>(Op1COp))
1227 if (FCmpInst *LHS = dyn_cast<FCmpInst>(Op0COp))
1694 Value *InstCombiner::FoldOrOfFCmps(FCmpInst *LHS, FCmpInst *RHS) {
1695 if (LHS->getPredicate() == FCmpInst::FCMP_UNO &&
1696 RHS->getPredicate() == FCmpInst::FCMP_UNO &&
1721 FCmpInst::Predicate Op0CC = LHS->getPredicate(), Op1CC = RHS->getPredicate();
1725 Op1CC = FCmpInst::getSwappedPredicate(Op1CC);
1731 return Builder->CreateFCmp((FCmpInst::Predicate)Op0CC, Op0LHS, Op0RHS);
1732 if (Op0CC == FCmpInst::FCMP_TRUE || Op1CC == FCmpInst::FCMP_TRUE)
1734 if (Op0CC == FCmpInst::FCMP_FALSE)
1736 if (Op1CC == FCmpInst::FCMP_FALSE)
2036 if (FCmpInst *LHS = dyn_cast<FCmpInst>(I.getOperand(0)))
2037 if (FCmpInst *RHS = dyn_cast<FCmpInst>(I.getOperand(1)))
2068 if (FCmpInst *RHS = dyn_cast<FCmpInst>(Op1COp))
2069 if (FCmpInst *LHS = dyn_cast<FCmpInst>(Op0COp))