Lines Matching defs:LHS

277   Value *LHS = nullptr;
282 m_Value(LHS), m_Value(RHS));
286 tryReassociateMinOrMax(I, MinMaxMatcher, LHS, RHS)))
289 tryReassociateMinOrMax(I, MinMaxMatcher, RHS, LHS)))
375 // sext(LHS + RHS) != sext(LHS) + sext(RHS).
380 Value *LHS = AO->getOperand(0), *RHS = AO->getOperand(1);
381 // IndexToSplit = LHS + RHS.
382 if (auto *NewGEP = tryReassociateGEPAtIndex(GEP, I, LHS, RHS, IndexedType))
384 // Symmetrically, try IndexToSplit = RHS + LHS.
385 if (LHS != RHS) {
387 tryReassociateGEPAtIndex(GEP, I, RHS, LHS, IndexedType))
396 unsigned I, Value *LHS,
399 // the I-th index is replaced with LHS.
403 // Replace the I-th index with LHS.
404 IndexExprs[I] = SE->getSCEV(LHS);
405 if (isKnownNonNegative(LHS, SimplifyQuery(*DL, DT, AC, GEP)) &&
406 DL->getTypeSizeInBits(LHS->getType()).getFixedValue() <
409 // Zero-extend LHS if it is non-negative. InstCombine canonicalizes sext to
467 Value *LHS = I->getOperand(0), *RHS = I->getOperand(1);
471 if (auto *NewI = tryReassociateBinaryOp(LHS, RHS, I))
473 if (auto *NewI = tryReassociateBinaryOp(RHS, LHS, I))
478 Instruction *NaryReassociatePass::tryReassociateBinaryOp(Value *LHS, Value *RHS,
483 if (LHS->hasOneUse() && matchTernaryOp(I, LHS, A, B)) {
505 // Look for the closest dominator LHS of I that computes LHSExpr, and replace
506 // I with LHS op RHS.
507 auto *LHS = findClosestMatchingDominator(LHSExpr, I);
508 if (LHS == nullptr)
514 NewI = BinaryOperator::CreateAdd(LHS, RHS, "", I->getIterator());
517 NewI = BinaryOperator::CreateMul(LHS, RHS, "", I->getIterator());
541 const SCEV *LHS,
545 return SE->getAddExpr(LHS, RHS);
547 return SE->getMulExpr(LHS, RHS);
607 // LHS - first operand of I
612 Value *LHS, Value *RHS) {
616 if (LHS->hasNUsesOrMore(3) ||
617 // The optimization is profitable only if LHS can be removed in the end.
618 // In other words LHS should be used (directly or indirectly) by I only.
619 llvm::any_of(LHS->users(),
624 !match(LHS, m_MaxMin))