Lines Matching refs:RHSCst
900 ConstantInt *RHSCst = dyn_cast<ConstantInt>(RHS->getOperand(1)); in FoldAndOfICmps() local
901 if (!LHSCst || !RHSCst) return nullptr; in FoldAndOfICmps()
903 if (LHSCst == RHSCst && LHSCC == RHSCC) { in FoldAndOfICmps()
926 SmallCst = RHSCst; in FoldAndOfICmps()
931 BigCst = RHSCst; in FoldAndOfICmps()
969 ShouldSwap = LHSCst->getValue().sgt(RHSCst->getValue()); in FoldAndOfICmps()
971 ShouldSwap = LHSCst->getValue().ugt(RHSCst->getValue()); in FoldAndOfICmps()
975 std::swap(LHSCst, RHSCst); in FoldAndOfICmps()
985 assert(LHSCst != RHSCst && "Compares not folded above?"); in FoldAndOfICmps()
1001 if (LHSCst == SubOne(RHSCst)) // (X != 13 & X u< 14) -> X < 13 in FoldAndOfICmps()
1004 return InsertRangeTest(Val, AddOne(LHSCst), RHSCst, false, true); in FoldAndOfICmps()
1007 if (LHSCst == SubOne(RHSCst)) // (X != 13 & X s< 14) -> X < 13 in FoldAndOfICmps()
1017 if (LHSCst->getValue() == 0 && RHSCst->getValue().isAllOnesValue()) in FoldAndOfICmps()
1018 std::swap(LHSCst, RHSCst); in FoldAndOfICmps()
1019 if (LHSCst == SubOne(RHSCst)){// (X != 13 & X != 14) -> X-13 >u 1 in FoldAndOfICmps()
1064 if (RHSCst == AddOne(LHSCst)) // (X u> 13 & X != 14) -> X u> 14 in FoldAndOfICmps()
1065 return Builder->CreateICmp(LHSCC, Val, RHSCst); in FoldAndOfICmps()
1068 return InsertRangeTest(Val, AddOne(LHSCst), RHSCst, false, true); in FoldAndOfICmps()
1082 if (RHSCst == AddOne(LHSCst)) // (X s> 13 & X != 14) -> X s> 14 in FoldAndOfICmps()
1083 return Builder->CreateICmp(LHSCC, Val, RHSCst); in FoldAndOfICmps()
1086 return InsertRangeTest(Val, AddOne(LHSCst), RHSCst, true, true); in FoldAndOfICmps()
1686 ConstantInt *RHSCst = dyn_cast<ConstantInt>(RHS->getOperand(1)); in FoldOrOfICmps() local
1689 RHS->getPredicate() == ICmpInst::ICMP_EQ && RHSCst && RHSCst->isZero()) { in FoldOrOfICmps()
1732 LHSCC == RHSCC && LHSCst && RHSCst && LHS->hasOneUse() && in FoldOrOfICmps()
1733 RHS->hasOneUse() && LHSCst->getType() == RHSCst->getType() && in FoldOrOfICmps()
1734 LHSCst->getValue() == (RHSCst->getValue())) { in FoldOrOfICmps()
1808 else if (RHSCC == ICmpInst::ICMP_EQ && RHSCst && RHSCst->isZero()) { in FoldOrOfICmps()
1830 if (!LHSCst || !RHSCst) return nullptr; in FoldOrOfICmps()
1832 if (LHSCst == RHSCst && LHSCC == RHSCC) { in FoldOrOfICmps()
1845 if (RHSCst->getValue() + AddCst->getValue() == LHSCst->getValue()) in FoldOrOfICmps()
1869 ShouldSwap = LHSCst->getValue().sgt(RHSCst->getValue()); in FoldOrOfICmps()
1871 ShouldSwap = LHSCst->getValue().ugt(RHSCst->getValue()); in FoldOrOfICmps()
1875 std::swap(LHSCst, RHSCst); in FoldOrOfICmps()
1885 assert(LHSCst != RHSCst && "Compares not folded above?"); in FoldOrOfICmps()
1898 APInt Xor = LHSCst->getValue() ^ RHSCst->getValue(); in FoldOrOfICmps()
1902 return Builder->CreateICmp(ICmpInst::ICMP_EQ, Or, RHSCst); in FoldOrOfICmps()
1906 if (LHSCst == SubOne(RHSCst)) { in FoldOrOfICmps()
1910 AddCST = ConstantExpr::getSub(AddOne(RHSCst), LHSCst); in FoldOrOfICmps()
1944 if (RHSCst->isMaxValue(false)) in FoldOrOfICmps()
1946 return InsertRangeTest(Val, LHSCst, AddOne(RHSCst), false, false); in FoldOrOfICmps()
1964 if (RHSCst->isMaxValue(true)) in FoldOrOfICmps()
1966 return InsertRangeTest(Val, LHSCst, AddOne(RHSCst), true, false); in FoldOrOfICmps()