LLVM  8.0.0svn
Macros | Functions
InstCombineAddSub.cpp File Reference
#include "InstCombineInternal.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/AlignOf.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/KnownBits.h"
#include <cassert>
#include <utility>
Include dependency graph for InstCombineAddSub.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "instcombine"
 

Functions

static ValuecheckForNegativeOperand (BinaryOperator &I, InstCombiner::BuilderTy &Builder)
 
static bool MatchMul (Value *E, Value *&Op, APInt &C)
 
static bool MatchRem (Value *E, Value *&Op, APInt &C, bool &IsSigned)
 
static bool MatchDiv (Value *E, Value *&Op, APInt &C, bool IsSigned)
 
static bool MulWillOverflow (APInt &C0, APInt &C1, bool IsSigned)
 
static InstructioncanonicalizeLowbitMask (BinaryOperator &I, InstCombiner::BuilderTy &Builder)
 Fold (1 << NBits) - 1 Into: ~(-(1 << NBits)) Because a 'not' is better for bit-tracking analysis and other transforms than an 'add'. More...
 
static InstructionfactorizeFAddFSub (BinaryOperator &I, InstCombiner::BuilderTy &Builder)
 Factor a common operand out of fadd/fsub of fmul/fdiv. More...
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "instcombine"

Definition at line 39 of file InstCombineAddSub.cpp.

Function Documentation

◆ canonicalizeLowbitMask()

static Instruction* canonicalizeLowbitMask ( BinaryOperator I,
InstCombiner::BuilderTy Builder 
)
static

◆ checkForNegativeOperand()

static Value* checkForNegativeOperand ( BinaryOperator I,
InstCombiner::BuilderTy Builder 
)
static

◆ factorizeFAddFSub()

static Instruction* factorizeFAddFSub ( BinaryOperator I,
InstCombiner::BuilderTy Builder 
)
static

◆ MatchDiv()

static bool MatchDiv ( Value E,
Value *&  Op,
APInt C,
bool  IsSigned 
)
static

◆ MatchMul()

static bool MatchMul ( Value E,
Value *&  Op,
APInt C 
)
static

◆ MatchRem()

static bool MatchRem ( Value E,
Value *&  Op,
APInt C,
bool IsSigned 
)
static

◆ MulWillOverflow()

static bool MulWillOverflow ( APInt C0,
APInt C1,
bool  IsSigned 
)
static