Lines Matching defs:LHS

97       Value *LHS, Value *RHS, Type *Ty, bool isNUW);
263 /// on LHS and RHS overflows.
275 Value *LHS, Value *RHS,
285 // Return (a, b) if (LHS, RHS) is known to be (a, b) or (b, a).
288 // - LHS = (select c, a, b), RHS = (select c, b, a)
289 // - LHS = (phi [a, BB0], [b, BB1]), RHS = (phi [b, BB0], [a, BB1])
290 // - LHS = min(a, b), RHS = max(a, b)
291 std::optional<std::pair<Value *, Value *>> matchSymmetricPair(Value *LHS,
312 bool willNotOverflowSignedAdd(const WithCache<const Value *> &LHS,
315 return computeOverflowForSignedAdd(LHS, RHS, &CxtI) ==
319 bool willNotOverflowUnsignedAdd(const WithCache<const Value *> &LHS,
322 return computeOverflowForUnsignedAdd(LHS, RHS, &CxtI) ==
326 bool willNotOverflowAdd(const Value *LHS, const Value *RHS,
328 return IsSigned ? willNotOverflowSignedAdd(LHS, RHS, CxtI)
329 : willNotOverflowUnsignedAdd(LHS, RHS, CxtI);
332 bool willNotOverflowSignedSub(const Value *LHS, const Value *RHS,
334 return computeOverflowForSignedSub(LHS, RHS, &CxtI) ==
338 bool willNotOverflowUnsignedSub(const Value *LHS, const Value *RHS,
340 return computeOverflowForUnsignedSub(LHS, RHS, &CxtI) ==
344 bool willNotOverflowSub(const Value *LHS, const Value *RHS,
346 return IsSigned ? willNotOverflowSignedSub(LHS, RHS, CxtI)
347 : willNotOverflowUnsignedSub(LHS, RHS, CxtI);
350 bool willNotOverflowSignedMul(const Value *LHS, const Value *RHS,
352 return computeOverflowForSignedMul(LHS, RHS, &CxtI) ==
356 bool willNotOverflowUnsignedMul(const Value *LHS, const Value *RHS,
359 return computeOverflowForUnsignedMul(LHS, RHS, &CxtI, IsNSW) ==
363 bool willNotOverflowMul(const Value *LHS, const Value *RHS,
365 return IsSigned ? willNotOverflowSignedMul(LHS, RHS, CxtI)
366 : willNotOverflowUnsignedMul(LHS, RHS, CxtI);
369 bool willNotOverflow(BinaryOperator::BinaryOps Opcode, const Value *LHS,
373 case Instruction::Add: return willNotOverflowAdd(LHS, RHS, CxtI, IsSigned);
374 case Instruction::Sub: return willNotOverflowSub(LHS, RHS, CxtI, IsSigned);
375 case Instruction::Mul: return willNotOverflowMul(LHS, RHS, CxtI, IsSigned);
413 Value *foldAndOrOfICmps(ICmpInst *LHS, ICmpInst *RHS, Instruction &I,
415 Value *foldXorOfICmps(ICmpInst *LHS, ICmpInst *RHS, BinaryOperator &Xor);
425 Value *foldLogicOfFCmps(FCmpInst *LHS, FCmpInst *RHS, bool IsAnd,
428 Instruction *foldLogicOfIsFPClass(BinaryOperator &Operator, Value *LHS,
434 Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS,
492 Value *LHS, Value *RHS, Instruction *CxtI) const;
516 Value *SimplifySelectsFeedingBinaryOp(BinaryOperator &I, Value *LHS,
540 /// the LHS is less than, equal to, or greater than RHS respectively.
541 /// Return true if we matched a three way compare idiom. The LHS, RHS, Less,
544 bool matchThreeWayIntCompare(SelectInst *SI, Value *&LHS, Value *&RHS,