llvm::MaskedValueIsZero

Return true if 'V & Mask' is known to be zero. We use this predicate to simplify operations downstream. Mask is known to be zero for bits that V cannot have.

Synopsis

Declared in <llvm/Analysis/ValueTracking.h>

bool
MaskedValueIsZero(
    Value const* V,
    APInt const& Mask,
    SimplifyQuery const& SQ,
    unsigned int Depth = 0);

Description

This function is defined on values with integer type, values with pointer type, and vectors of integers. In the case where V is a vector, the mask, known zero, and known one values are the same width as the vector element, and the bit is set only if it is true for all of the elements in the vector.

Return Value

True if V masked by Mask is known to be zero.

Parameters

NameDescription
VValue being masked.
MaskBits of V that must be proven zero.
SQSimplify query providing context for the analysis.
DepthCurrent recursion depth for this query.