• Home
  • Raw
  • Download

Lines Matching refs:LHSCst

899   ConstantInt *LHSCst = dyn_cast<ConstantInt>(LHS->getOperand(1));  in FoldAndOfICmps()  local
901 if (!LHSCst || !RHSCst) return nullptr; in FoldAndOfICmps()
903 if (LHSCst == RHSCst && LHSCC == RHSCC) { in FoldAndOfICmps()
907 if ((LHSCC == ICmpInst::ICMP_ULT && LHSCst->getValue().isPowerOf2()) || in FoldAndOfICmps()
908 (LHSCC == ICmpInst::ICMP_EQ && LHSCst->isZero())) { in FoldAndOfICmps()
910 return Builder->CreateICmp(LHSCC, NewOr, LHSCst); in FoldAndOfICmps()
927 BigCst = LHSCst; in FoldAndOfICmps()
930 SmallCst = LHSCst; 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()
1002 return Builder->CreateICmpULT(Val, LHSCst); in FoldAndOfICmps()
1003 if (LHSCst->isNullValue()) // (X != 0 & X u< 14) -> X-1 u< 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()
1008 return Builder->CreateICmpSLT(Val, LHSCst); 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()
1020 Constant *AddCST = ConstantExpr::getNeg(LHSCst); in FoldAndOfICmps()
1064 if (RHSCst == AddOne(LHSCst)) // (X u> 13 & X != 14) -> X u> 14 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()
1086 return InsertRangeTest(Val, AddOne(LHSCst), RHSCst, true, true); in FoldAndOfICmps()
1685 ConstantInt *LHSCst = dyn_cast<ConstantInt>(LHS->getOperand(1)); in FoldOrOfICmps() local
1688 if (LHS->getPredicate() == ICmpInst::ICMP_EQ && LHSCst && LHSCst->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()
1743 LAddCst->getValue().ugt(LHSCst->getValue()) && in FoldOrOfICmps()
1744 RAddCst->getValue().ugt(LHSCst->getValue())) { in FoldOrOfICmps()
1755 APInt RRangeHigh = RRangeLow + LHSCst->getValue(); in FoldOrOfICmps()
1757 APInt LRangeHigh = LRangeLow + LHSCst->getValue(); in FoldOrOfICmps()
1764 RangeDiff.ugt(LHSCst->getValue())) { in FoldOrOfICmps()
1769 return (Builder->CreateICmp(LHS->getPredicate(), NewAdd, LHSCst)); in FoldOrOfICmps()
1799 if (LHSCC == ICmpInst::ICMP_EQ && LHSCst && LHSCst->isZero()) { in FoldOrOfICmps()
1830 if (!LHSCst || !RHSCst) return nullptr; in FoldOrOfICmps()
1832 if (LHSCst == RHSCst && LHSCC == RHSCC) { in FoldOrOfICmps()
1834 if (LHSCC == ICmpInst::ICMP_NE && LHSCst->isZero()) { in FoldOrOfICmps()
1836 return Builder->CreateICmp(LHSCC, NewOr, LHSCst); in FoldOrOfICmps()
1845 if (RHSCst->getValue() + AddCst->getValue() == LHSCst->getValue()) in FoldOrOfICmps()
1846 return Builder->CreateICmpULE(Val, LHSCst); 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()
1896 assert(LHSCst->getValue().ule(LHSCst->getValue())); in FoldOrOfICmps()
1898 APInt Xor = LHSCst->getValue() ^ RHSCst->getValue(); in FoldOrOfICmps()
1906 if (LHSCst == SubOne(RHSCst)) { in FoldOrOfICmps()
1908 Constant *AddCST = ConstantExpr::getNeg(LHSCst); in FoldOrOfICmps()
1910 AddCST = ConstantExpr::getSub(AddOne(RHSCst), LHSCst); in FoldOrOfICmps()
1946 return InsertRangeTest(Val, LHSCst, AddOne(RHSCst), false, false); in FoldOrOfICmps()
1966 return InsertRangeTest(Val, LHSCst, AddOne(RHSCst), true, false); in FoldOrOfICmps()