LLVM API Documentation
#include "InstCombine.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/PatternMatch.h"
Go to the source code of this file.
Defines | |
#define | DEBUG_TYPE "instcombine" |
Functions | |
static bool | ShrinkDemandedConstant (Instruction *I, unsigned OpNo, APInt Demanded) |
#define DEBUG_TYPE "instcombine" |
Definition at line 23 of file InstCombineSimplifyDemanded.cpp.
static bool ShrinkDemandedConstant | ( | Instruction * | I, |
unsigned | OpNo, | ||
APInt | Demanded | ||
) | [static] |
ShrinkDemandedConstant - Check to see if the specified operand of the specified instruction is a constant integer. If so, check to see if there are any bits set in the constant that are not demanded. If so, shrink the constant and return true.
Definition at line 29 of file InstCombineSimplifyDemanded.cpp.
References llvm::dyn_cast(), llvm::ConstantInt::get(), llvm::APInt::getBitWidth(), llvm::User::getOperand(), llvm::ConstantInt::getType(), llvm::ConstantInt::getValue(), llvm::APInt::isNegative(), llvm::User::setOperand(), and llvm::APInt::zextOrTrunc().