|
LLVM
7.0.0
|
#include "InstCombineInternal.h"#include "llvm/Analysis/ValueTracking.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/PatternMatch.h"#include "llvm/Support/KnownBits.h"#include "InstCombineTables.inc"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "instcombine" |
| #define | GET_AMDGPUImageDMaskIntrinsicTable_IMPL |
Functions | |
| static bool | ShrinkDemandedConstant (Instruction *I, unsigned OpNo, const APInt &Demanded) |
| Check to see if the specified operand of the specified instruction is a constant integer. More... | |
| #define DEBUG_TYPE "instcombine" |
Definition at line 24 of file InstCombineSimplifyDemanded.cpp.
| #define GET_AMDGPUImageDMaskIntrinsicTable_IMPL |
Definition at line 32 of file InstCombineSimplifyDemanded.cpp.
|
static |
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 40 of file InstCombineSimplifyDemanded.cpp.
References llvm::MCID::Add, Arg, llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::APInt::ashr(), assert(), llvm::tgtok::Bit, C, llvm::MCID::Call, llvm::APInt::clearAllBits(), llvm::APInt::clearBit(), llvm::KnownBits::computeForAddSub(), llvm::computeKnownBits(), llvm::ComputeNumSignBits(), llvm::Instruction::copyMetadata(), llvm::APInt::countLeadingZeros(), llvm::KnownBits::countMinLeadingZeros(), llvm::countPopulation(), llvm::APInt::countPopulation(), llvm::APInt::countTrailingZeros(), llvm::InsertElementInst::Create(), llvm::Depth, llvm::dyn_cast(), E, llvm::ConstantInt::get(), llvm::Use::get(), llvm::ConstantAggregateZero::get(), llvm::VectorType::get(), llvm::ConstantVector::get(), llvm::UndefValue::get(), llvm::APInt::getActiveBits(), llvm::Constant::getAggregateElement(), llvm::APInt::getAllOnesValue(), llvm::CallBase< InstTy >::getArgOperand(), llvm::KnownBits::getBitWidth(), llvm::APInt::getBitWidth(), llvm::CallBase< InstTy >::getCalledFunction(), llvm::Value::getContext(), llvm::Intrinsic::getDeclaration(), llvm::Function::getFunctionType(), llvm::APInt::getHighBitsSet(), llvm::Type::getInt32Ty(), llvm::Constant::getIntegerValue(), llvm::IntrinsicInst::getIntrinsicID(), llvm::Intrinsic::getIntrinsicInfoTableEntries(), llvm::APInt::getLimitedValue(), llvm::APInt::getLoBits(), llvm::APInt::getLowBitsSet(), llvm::ShuffleVectorInst::getMaskValue(), llvm::Value::getName(), llvm::Constant::getNullValue(), llvm::CallBase< InstTy >::getNumArgOperands(), llvm::SequentialType::getNumElements(), llvm::FunctionType::getNumParams(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::User::getOperandUse(), llvm::FunctionType::getParamType(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::FunctionType::getReturnType(), llvm::Type::getScalarSizeInBits(), llvm::APInt::getSignMask(), llvm::ConstantInt::getType(), llvm::Value::getType(), llvm::ShuffleVectorInst::getType(), llvm::ConstantInt::getValue(), llvm::Type::getVectorElementType(), llvm::Type::getVectorNumElements(), llvm::ConstantInt::getZExtValue(), llvm::APInt::getZExtValue(), llvm::KnownBits::hasConflict(), llvm::Instruction::hasNoSignedWrap(), llvm::Instruction::hasNoUnsignedWrap(), llvm::Value::hasOneUse(), I, if(), llvm::APInt::intersects(), llvm::APInt::isAllOnesValue(), llvm::Type::isIntOrIntVectorTy(), llvm::APInt::isMask(), llvm::KnownBits::isNonNegative(), llvm::Constant::isNullValue(), llvm::APInt::isNullValue(), llvm::APInt::isOneValue(), llvm::APInt::isPowerOf2(), llvm::APInt::isSignBitSet(), llvm::APInt::isSignMask(), llvm::APInt::isSubsetOf(), llvm::Type::isVectorTy(), llvm_unreachable, llvm::APInt::lshr(), llvm::APInt::lshrInPlace(), llvm::PatternMatch::m_APInt(), llvm::PatternMatch::m_Shr(), llvm::PatternMatch::m_Value(), llvm::KnownBits::makeNonNegative(), llvm::PatternMatch::match(), llvm::Intrinsic::matchIntrinsicType(), llvm::matchSelectPattern(), llvm::KnownBits::One, llvm::PowerOf2Ceil(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), RA, llvm::KnownBits::resetAll(), llvm::MCID::Select, llvm::APInt::setAllBits(), llvm::CallBase< InstTy >::setArgOperand(), llvm::APInt::setBit(), llvm::APInt::setBitsFrom(), llvm::Instruction::setHasNoSignedWrap(), llvm::Instruction::setHasNoUnsignedWrap(), llvm::APInt::setHighBits(), llvm::Instruction::setIsExact(), llvm::APInt::setLowBits(), llvm::User::setOperand(), llvm::APInt::setSignBit(), llvm::KnownBits::sext(), llvm::APInt::shl(), llvm::SPF_UNKNOWN, llvm::Value::takeName(), llvm::APInt::trunc(), llvm::APInt::uge(), llvm::APInt::ult(), llvm::RegState::Undef, llvm::KnownBits::Zero, llvm::APInt::zext(), llvm::KnownBits::zextOrTrunc(), and llvm::APInt::zextOrTrunc().
Referenced by llvm::TargetLowering::TargetLoweringOpt::CombineTo().
1.8.13