Lines Matching refs:RHSCst
914 ConstantInt *RHSCst = dyn_cast<ConstantInt>(RHS->getOperand(1)); in FoldAndOfICmps() local
915 if (!LHSCst || !RHSCst) return nullptr; in FoldAndOfICmps()
917 if (LHSCst == RHSCst && LHSCC == RHSCC) { in FoldAndOfICmps()
945 SmallCst = RHSCst; in FoldAndOfICmps()
950 BigCst = RHSCst; in FoldAndOfICmps()
984 ConstantRange::makeAllowedICmpRegion(RHSCC, RHSCst->getValue()); in FoldAndOfICmps()
998 ShouldSwap = LHSCst->getValue().sgt(RHSCst->getValue()); in FoldAndOfICmps()
1000 ShouldSwap = LHSCst->getValue().ugt(RHSCst->getValue()); in FoldAndOfICmps()
1004 std::swap(LHSCst, RHSCst); in FoldAndOfICmps()
1014 assert(LHSCst != RHSCst && "Compares not folded above?"); in FoldAndOfICmps()
1030 if (LHSCst == SubOne(RHSCst)) // (X != 13 & X u< 14) -> X < 13 in FoldAndOfICmps()
1033 return InsertRangeTest(Val, AddOne(LHSCst), RHSCst, false, true); in FoldAndOfICmps()
1036 if (LHSCst == SubOne(RHSCst)) // (X != 13 & X s< 14) -> X < 13 in FoldAndOfICmps()
1046 if (LHSCst->getValue() == 0 && RHSCst->getValue().isAllOnesValue()) in FoldAndOfICmps()
1047 std::swap(LHSCst, RHSCst); in FoldAndOfICmps()
1048 if (LHSCst == SubOne(RHSCst)){// (X != 13 & X != 14) -> X-13 >u 1 in FoldAndOfICmps()
1093 if (RHSCst == AddOne(LHSCst)) // (X u> 13 & X != 14) -> X u> 14 in FoldAndOfICmps()
1094 return Builder->CreateICmp(LHSCC, Val, RHSCst); in FoldAndOfICmps()
1097 return InsertRangeTest(Val, AddOne(LHSCst), RHSCst, false, true); in FoldAndOfICmps()
1111 if (RHSCst == AddOne(LHSCst)) // (X s> 13 & X != 14) -> X s> 14 in FoldAndOfICmps()
1112 return Builder->CreateICmp(LHSCC, Val, RHSCst); in FoldAndOfICmps()
1115 return InsertRangeTest(Val, AddOne(LHSCst), RHSCst, true, true); in FoldAndOfICmps()
1698 ConstantInt *RHSCst = dyn_cast<ConstantInt>(RHS->getOperand(1)); in FoldOrOfICmps() local
1701 RHS->getPredicate() == ICmpInst::ICMP_EQ && RHSCst && RHSCst->isZero()) { in FoldOrOfICmps()
1744 LHSCC == RHSCC && LHSCst && RHSCst && LHS->hasOneUse() && in FoldOrOfICmps()
1745 RHS->hasOneUse() && LHSCst->getType() == RHSCst->getType() && in FoldOrOfICmps()
1746 LHSCst->getValue() == (RHSCst->getValue())) { in FoldOrOfICmps()
1820 else if (RHSCC == ICmpInst::ICMP_EQ && RHSCst && RHSCst->isZero()) { in FoldOrOfICmps()
1842 if (!LHSCst || !RHSCst) return nullptr; in FoldOrOfICmps()
1844 if (LHSCst == RHSCst && LHSCC == RHSCC) { in FoldOrOfICmps()
1857 if (RHSCst->getValue() + AddCst->getValue() == LHSCst->getValue()) in FoldOrOfICmps()
1881 ShouldSwap = LHSCst->getValue().sgt(RHSCst->getValue()); in FoldOrOfICmps()
1883 ShouldSwap = LHSCst->getValue().ugt(RHSCst->getValue()); in FoldOrOfICmps()
1887 std::swap(LHSCst, RHSCst); in FoldOrOfICmps()
1897 assert(LHSCst != RHSCst && "Compares not folded above?"); in FoldOrOfICmps()
1910 APInt Xor = LHSCst->getValue() ^ RHSCst->getValue(); in FoldOrOfICmps()
1918 if (LHSCst == SubOne(RHSCst)) { in FoldOrOfICmps()
1922 AddCST = ConstantExpr::getSub(AddOne(RHSCst), LHSCst); in FoldOrOfICmps()
1956 if (RHSCst->isMaxValue(false)) in FoldOrOfICmps()
1958 return InsertRangeTest(Val, LHSCst, AddOne(RHSCst), false, false); in FoldOrOfICmps()
1976 if (RHSCst->isMaxValue(true)) in FoldOrOfICmps()
1978 return InsertRangeTest(Val, LHSCst, AddOne(RHSCst), true, false); in FoldOrOfICmps()