• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/llvm-project/llvm/lib/Transforms/InstCombine/

Lines Matching defs:LHSC

831     // If LHSC and RHSC differ by only one bit, then set that bit in X and
872 ConstantInt *LHSC = dyn_cast<ConstantInt>(LHS->getOperand(1));
874 if (!LHSC || !RHSC || !LHSC->isZero() || !RHSC->isZero())
1200 ConstantInt *LHSC = dyn_cast<ConstantInt>(LHS->getOperand(1));
1202 if (!LHSC || !RHSC)
1205 if (LHSC == RHSC && PredL == PredR) {
1209 if ((PredL == ICmpInst::ICMP_ULT && LHSC->getValue().isPowerOf2()) ||
1210 (PredL == ICmpInst::ICMP_EQ && LHSC->isZero())) {
1212 return Builder.CreateICmp(PredL, NewOr, LHSC);
1229 BigC = LHSC;
1232 SmallC = LHSC;
1272 ShouldSwap = LHSC->getValue().sgt(RHSC->getValue());
1274 ShouldSwap = LHSC->getValue().ugt(RHSC->getValue());
1278 std::swap(LHSC, RHSC);
1288 assert(LHSC != RHSC && "Compares not folded above?");
1299 if (LHSC->getValue() == (RHSC->getValue() - 1))
1300 return Builder.CreateICmpULT(LHS0, LHSC);
1301 if (LHSC->isZero()) // (X != 0 & X u< C) -> X-1 u< C-1
1302 return insertRangeTest(LHS0, LHSC->getValue() + 1, RHSC->getValue(),
1307 if (LHSC->getValue() == (RHSC->getValue() - 1))
1308 return Builder.CreateICmpSLT(LHS0, LHSC);
1310 if (LHSC->isMinValue(true))
1311 return insertRangeTest(LHS0, LHSC->getValue() + 1, RHSC->getValue(),
1325 if (RHSC->getValue() == (LHSC->getValue() + 1))
1329 return insertRangeTest(LHS0, LHSC->getValue() + 1, RHSC->getValue(),
1333 return insertRangeTest(LHS0, LHSC->getValue() + 1, RHSC->getValue(),
1343 if (RHSC->getValue() == (LHSC->getValue() + 1))
1347 return insertRangeTest(LHS0, LHSC->getValue() + 1, RHSC->getValue(),
1351 return insertRangeTest(LHS0, LHSC->getValue() + 1, RHSC->getValue(), true,
2198 ConstantInt *LHSC = dyn_cast<ConstantInt>(LHS->getOperand(1));
2213 PredL == PredR && LHSC && RHSC && LHS->hasOneUse() && RHS->hasOneUse() &&
2214 LHSC->getType() == RHSC->getType() &&
2215 LHSC->getValue() == (RHSC->getValue())) {
2224 LAddC->getValue().ugt(LHSC->getValue()) &&
2225 RAddC->getValue().ugt(LHSC->getValue())) {
2236 APInt RRangeHigh = RRangeLow + LHSC->getValue();
2238 APInt LRangeHigh = LRangeLow + LHSC->getValue();
2245 RangeDiff.ugt(LHSC->getValue())) {
2250 return Builder.CreateICmp(LHS->getPredicate(), NewAdd, LHSC);
2280 if (PredL == ICmpInst::ICMP_EQ && LHSC && LHSC->isZero()) {
2324 if (!LHSC || !RHSC)
2327 if (LHSC == RHSC && PredL == PredR) {
2329 if (PredL == ICmpInst::ICMP_NE && LHSC->isZero()) {
2331 return Builder.CreateICmp(PredL, NewOr, LHSC);
2340 if (RHSC->getValue() + AddC->getValue() == LHSC->getValue())
2341 return Builder.CreateICmpULE(LHS0, LHSC);
2364 ShouldSwap = LHSC->getValue().sgt(RHSC->getValue());
2366 ShouldSwap = LHSC->getValue().ugt(RHSC->getValue());
2370 std::swap(LHSC, RHSC);
2380 assert(LHSC != RHSC && "Compares not folded above?");
2394 if (LHSC->isMinValue(false))
2395 return insertRangeTest(LHS0, LHSC->getValue() + 1, RHSC->getValue() + 1,
2401 if (LHSC->isMinValue(true))
2402 return insertRangeTest(LHS0, LHSC->getValue() + 1, RHSC->getValue() + 1,
2415 return insertRangeTest(LHS0, LHSC->getValue(), RHSC->getValue(),
2420 return insertRangeTest(LHS0, LHSC->getValue(), RHSC->getValue() + 1,
2431 return insertRangeTest(LHS0, LHSC->getValue(), RHSC->getValue(),
2437 return insertRangeTest(LHS0, LHSC->getValue(), RHSC->getValue() + 1, true,