LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
InstCombineAddSub.cpp File Reference
#include "InstCombine.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
#include "llvm/Support/PatternMatch.h"
Include dependency graph for InstCombineAddSub.cpp:

Go to the source code of this file.

Functions

static ConstantAddOne (Constant *C)
 AddOne - Add one to a ConstantInt. More...
 
static ConstantSubOne (ConstantInt *C)
 SubOne - Subtract one from a ConstantInt. More...
 
static Valuedyn_castFoldableMul (Value *V, ConstantInt *&CST)
 

Function Documentation

static Constant* AddOne ( Constant C)
static
static Value* dyn_castFoldableMul ( Value V,
ConstantInt *&  CST 
)
inlinestatic
static Constant* SubOne ( ConstantInt C)
static

SubOne - Subtract one from a ConstantInt.

Definition at line 854 of file InstCombineAddSub.cpp.

References llvm::ConstantInt::get(), llvm::Value::getContext(), and llvm::ConstantInt::getValue().

Referenced by llvm::InstCombiner::visitAdd(), and llvm::InstCombiner::visitSub().