Lines Matching refs:RHSCst

912   ConstantInt *RHSCst = dyn_cast<ConstantInt>(RHS->getOperand(1));
913 if (!LHSCst || !RHSCst) return nullptr;
915 if (LHSCst == RHSCst && LHSCC == RHSCC) {
943 SmallCst = RHSCst;
948 BigCst = RHSCst;
982 ConstantRange::makeAllowedICmpRegion(RHSCC, RHSCst->getValue());
996 ShouldSwap = LHSCst->getValue().sgt(RHSCst->getValue());
998 ShouldSwap = LHSCst->getValue().ugt(RHSCst->getValue());
1002 std::swap(LHSCst, RHSCst);
1012 assert(LHSCst != RHSCst && "Compares not folded above?");
1028 if (LHSCst == SubOne(RHSCst)) // (X != 13 & X u< 14) -> X < 13
1031 return InsertRangeTest(Val, AddOne(LHSCst), RHSCst, false, true);
1034 if (LHSCst == SubOne(RHSCst)) // (X != 13 & X s< 14) -> X < 13
1044 if (LHSCst->getValue() == 0 && RHSCst->getValue().isAllOnesValue())
1045 std::swap(LHSCst, RHSCst);
1046 if (LHSCst == SubOne(RHSCst)){// (X != 13 & X != 14) -> X-13 >u 1
1091 if (RHSCst == AddOne(LHSCst)) // (X u> 13 & X != 14) -> X u> 14
1092 return Builder->CreateICmp(LHSCC, Val, RHSCst);
1095 return InsertRangeTest(Val, AddOne(LHSCst), RHSCst, false, true);
1109 if (RHSCst == AddOne(LHSCst)) // (X s> 13 & X != 14) -> X s> 14
1110 return Builder->CreateICmp(LHSCC, Val, RHSCst);
1113 return InsertRangeTest(Val, AddOne(LHSCst), RHSCst, true, true);
1787 ConstantInt *RHSCst = dyn_cast<ConstantInt>(RHS->getOperand(1));
1790 RHS->getPredicate() == ICmpInst::ICMP_EQ && RHSCst && RHSCst->isZero()) {
1833 LHSCC == RHSCC && LHSCst && RHSCst && LHS->hasOneUse() &&
1834 RHS->hasOneUse() && LHSCst->getType() == RHSCst->getType() &&
1835 LHSCst->getValue() == (RHSCst->getValue())) {
1909 else if (RHSCC == ICmpInst::ICMP_EQ && RHSCst && RHSCst->isZero()) {
1931 if (!LHSCst || !RHSCst) return nullptr;
1933 if (LHSCst == RHSCst && LHSCC == RHSCC) {
1946 if (RHSCst->getValue() + AddCst->getValue() == LHSCst->getValue())
1970 ShouldSwap = LHSCst->getValue().sgt(RHSCst->getValue());
1972 ShouldSwap = LHSCst->getValue().ugt(RHSCst->getValue());
1976 std::swap(LHSCst, RHSCst);
1986 assert(LHSCst != RHSCst && "Compares not folded above?");
1995 // if LHSCst and RHSCst differ only by one bit:
1999 APInt Xor = LHSCst->getValue() ^ RHSCst->getValue();
2003 return Builder->CreateICmp(ICmpInst::ICMP_EQ, Or, RHSCst);
2007 if (LHSCst == SubOne(RHSCst)) {
2011 AddCST = ConstantExpr::getSub(AddOne(RHSCst), LHSCst);
2043 // If RHSCst is [us]MAXINT, it is always false. Not handling
2045 if (RHSCst->isMaxValue(false))
2047 return InsertRangeTest(Val, LHSCst, AddOne(RHSCst), false, false);
2063 // If RHSCst is [us]MAXINT, it is always false. Not handling
2065 if (RHSCst->isMaxValue(true))
2067 return InsertRangeTest(Val, LHSCst, AddOne(RHSCst), true, false);