LLVM API Documentation
#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"
Go to the source code of this file.
Functions | |
static Constant * | AddOne (Constant *C) |
AddOne - Add one to a ConstantInt. More... | |
static Constant * | SubOne (ConstantInt *C) |
SubOne - Subtract one from a ConstantInt. More... | |
static Value * | dyn_castFoldableMul (Value *V, ConstantInt *&CST) |
AddOne - Add one to a ConstantInt.
Definition at line 849 of file InstCombineAddSub.cpp.
References llvm::ConstantInt::get(), llvm::ConstantExpr::getAdd(), and llvm::Value::getType().
Referenced by llvm::ScalarEvolution::getAddExpr(), llvm::InstCombiner::visitAdd(), and llvm::InstCombiner::visitSub().
|
inlinestatic |
Definition at line 864 of file InstCombineAddSub.cpp.
References llvm::dyn_cast(), llvm::ConstantInt::get(), getBitWidth(), llvm::Type::getContext(), llvm::ConstantInt::getLimitedValue(), llvm::APInt::getOneBitSet(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), llvm::Value::hasOneUse(), and llvm::Type::isIntegerTy().
Referenced by llvm::InstCombiner::visitAdd(), and llvm::InstCombiner::visitSub().
|
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().