Home | History | Annotate | Download | only in InstCombine

Lines Matching refs:RHSCst

734   ConstantInt *RHSCst = dyn_cast<ConstantInt>(RHS->getOperand(1));
735 if (LHSCst == 0 || RHSCst == 0) return 0;
737 if (LHSCst == RHSCst && LHSCC == RHSCC) {
764 SmallCst = RHSCst;
771 BigCst = RHSCst;
805 ConstantRange::makeICmpRegion(RHSCC, RHSCst->getValue());
819 ShouldSwap = LHSCst->getValue().sgt(RHSCst->getValue());
821 ShouldSwap = LHSCst->getValue().ugt(RHSCst->getValue());
825 std::swap(LHSCst, RHSCst);
835 assert(LHSCst != RHSCst && "Compares not folded above?");
851 if (LHSCst == SubOne(RHSCst)) // (X != 13 & X u< 14) -> X < 13
855 if (LHSCst == SubOne(RHSCst)) // (X != 13 & X s< 14) -> X < 13
863 if (LHSCst == SubOne(RHSCst)){// (X != 13 & X != 14) -> X-13 >u 1
907 if (RHSCst == AddOne(LHSCst)) // (X u> 13 & X != 14) -> X u> 14
908 return Builder->CreateICmp(LHSCC, Val, RHSCst);
911 return InsertRangeTest(Val, AddOne(LHSCst), RHSCst, false, true);
925 if (RHSCst == AddOne(LHSCst)) // (X s> 13 & X != 14) -> X s> 14
926 return Builder->CreateICmp(LHSCC, Val, RHSCst);
929 return InsertRangeTest(Val, AddOne(LHSCst), RHSCst, true, true);
1459 ConstantInt *RHSCst = dyn_cast<ConstantInt>(RHS->getOperand(1));
1460 if (LHSCst == 0 || RHSCst == 0) return 0;
1462 if (LHSCst == RHSCst && LHSCC == RHSCC) {
1475 if (RHSCst->getValue() + AddCst->getValue() == LHSCst->getValue())
1499 ShouldSwap = LHSCst->getValue().sgt(RHSCst->getValue());
1501 ShouldSwap = LHSCst->getValue().ugt(RHSCst->getValue());
1505 std::swap(LHSCst, RHSCst);
1515 assert(LHSCst != RHSCst && "Compares not folded above?");
1523 if (LHSCst == SubOne(RHSCst)) {
1527 AddCST = ConstantExpr::getSub(AddOne(RHSCst), LHSCst);
1558 // If RHSCst is [us]MAXINT, it is always false. Not handling
1560 if (RHSCst->isMaxValue(false))
1562 return InsertRangeTest(Val, LHSCst, AddOne(RHSCst), false, false);
1578 // If RHSCst is [us]MAXINT, it is always false. Not handling
1580 if (RHSCst->isMaxValue(true))
1582 return InsertRangeTest(Val, LHSCst, AddOne(RHSCst), true, false);