ΒΆbool isKnownToBeAPowerOfTwo(
const llvm::Value* V,
const llvm::DataLayout& DL,
bool OrZero = false,
unsigned int Depth = 0,
llvm::AssumptionCache* AC = nullptr,
const llvm::Instruction* CxtI = nullptr,
const llvm::DominatorTree* DT = nullptr,
bool UseInstrInfo = true)
bool isKnownToBeAPowerOfTwo(
const llvm::Value* V,
const llvm::DataLayout& DL,
bool OrZero = false,
unsigned int Depth = 0,
llvm::AssumptionCache* AC = nullptr,
const llvm::Instruction* CxtI = nullptr,
const llvm::DominatorTree* DT = nullptr,
bool UseInstrInfo = true)
Description
Return true if the given value is known to have exactly one bit set when defined. For vectors return true if every element is known to be a power of two when defined. Supports values with integer or pointer type and vectors of integers. If 'OrZero' is set, then return true if the given value is either a power of two or zero.
Declared at: llvm/include/llvm/Analysis/ValueTracking.h:89
Parameters
- const llvm::Value* V
- const llvm::DataLayout& DL
- bool OrZero = false
- unsigned int Depth = 0
- llvm::AssumptionCache* AC = nullptr
- const llvm::Instruction* CxtI = nullptr
- const llvm::DominatorTree* DT = nullptr
- bool UseInstrInfo = true