Lines Matching defs:RHS
94 Value *LHS, Value *RHS, Type *Ty, bool isNUW);
261 /// on LHS and RHS overflows.
273 Value *LHS, Value *RHS,
283 // Return (a, b) if (LHS, RHS) is known to be (a, b) or (b, a).
286 // - LHS = (select c, a, b), RHS = (select c, b, a)
287 // - LHS = (phi [a, BB0], [b, BB1]), RHS = (phi [b, BB0], [a, BB1])
288 // - LHS = min(a, b), RHS = max(a, b)
290 Value *RHS);
311 const WithCache<const Value *> &RHS,
313 return computeOverflowForSignedAdd(LHS, RHS, &CxtI) ==
318 const WithCache<const Value *> &RHS,
320 return computeOverflowForUnsignedAdd(LHS, RHS, &CxtI) ==
324 bool willNotOverflowAdd(const Value *LHS, const Value *RHS,
326 return IsSigned ? willNotOverflowSignedAdd(LHS, RHS, CxtI)
327 : willNotOverflowUnsignedAdd(LHS, RHS, CxtI);
330 bool willNotOverflowSignedSub(const Value *LHS, const Value *RHS,
332 return computeOverflowForSignedSub(LHS, RHS, &CxtI) ==
336 bool willNotOverflowUnsignedSub(const Value *LHS, const Value *RHS,
338 return computeOverflowForUnsignedSub(LHS, RHS, &CxtI) ==
342 bool willNotOverflowSub(const Value *LHS, const Value *RHS,
344 return IsSigned ? willNotOverflowSignedSub(LHS, RHS, CxtI)
345 : willNotOverflowUnsignedSub(LHS, RHS, CxtI);
348 bool willNotOverflowSignedMul(const Value *LHS, const Value *RHS,
350 return computeOverflowForSignedMul(LHS, RHS, &CxtI) ==
354 bool willNotOverflowUnsignedMul(const Value *LHS, const Value *RHS,
357 return computeOverflowForUnsignedMul(LHS, RHS, &CxtI, IsNSW) ==
361 bool willNotOverflowMul(const Value *LHS, const Value *RHS,
363 return IsSigned ? willNotOverflowSignedMul(LHS, RHS, CxtI)
364 : willNotOverflowUnsignedMul(LHS, RHS, CxtI);
368 const Value *RHS, const Instruction &CxtI,
371 case Instruction::Add: return willNotOverflowAdd(LHS, RHS, CxtI, IsSigned);
372 case Instruction::Sub: return willNotOverflowSub(LHS, RHS, CxtI, IsSigned);
373 case Instruction::Mul: return willNotOverflowMul(LHS, RHS, CxtI, IsSigned);
411 Value *foldAndOrOfICmps(ICmpInst *LHS, ICmpInst *RHS, Instruction &I,
413 Value *foldXorOfICmps(ICmpInst *LHS, ICmpInst *RHS, BinaryOperator &Xor);
423 Value *foldLogicOfFCmps(FCmpInst *LHS, FCmpInst *RHS, bool IsAnd,
427 Value *RHS);
429 Value *foldBooleanAndOr(Value *LHS, Value *RHS, Instruction &I, bool IsAnd,
493 Value *LHS, Value *RHS, Instruction *CxtI) const;
518 Value *RHS);
541 /// the LHS is less than, equal to, or greater than RHS respectively.
542 /// Return true if we matched a three way compare idiom. The LHS, RHS, Less,
545 bool matchThreeWayIntCompare(SelectInst *SI, Value *&LHS, Value *&RHS,
592 Instruction *foldAddLikeCommutative(Value *LHS, Value *RHS, bool NSW,
656 Instruction *foldGEPICmp(GEPOperator *GEPLHS, Value *RHS, CmpPredicate Cond,
658 Instruction *foldSelectICmp(CmpPredicate Pred, SelectInst *SI, Value *RHS,