factor some logic out of instcombine into a new SimplifyAddInst method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90011 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2009-11-27 17:42:22 +00:00
parent 1d159838a3
commit 8aee8efc0c
3 changed files with 47 additions and 17 deletions
@@ -20,6 +20,11 @@ namespace llvm {
class Instruction;
class Value;
class TargetData;
/// SimplifyAddInst - Given operands for an Add, see if we can
/// fold the result. If not, this returns null.
Value *SimplifyAddInst(Value *LHS, Value *RHS, bool isNSW, bool isNUW,
const TargetData *TD = 0);
/// SimplifyAndInst - Given operands for an And, see if we can
/// fold the result. If not, this returns null.