ΒΆbool isKnownNonZero(
    const llvm::Value* V,
    const llvm::DataLayout& DL,
    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 be non-zero when defined. For vectors, return true if every element is known to be non-zero when defined. For pointers, if the context instruction and dominator tree are specified, perform context-sensitive analysis and return true if the pointer couldn't possibly be null at the specified instruction. Supports values with integer or pointer type and vectors of integers.

Declared at: llvm/include/llvm/Analysis/ValueTracking.h:104

Parameters

const llvm::Value* V
const llvm::DataLayout& DL
unsigned int Depth = 0
llvm::AssumptionCache* AC = nullptr
const llvm::Instruction* CxtI = nullptr
const llvm::DominatorTree* DT = nullptr
bool UseInstrInfo = true