llvm::computeKnownFPSignBit

Return the known sign bit of a floating-point value, if provable.

Synopsis

Declared in <llvm/Analysis/ValueTracking.h>

std::optional<bool>
computeKnownFPSignBit(
    Value const* V,
    SimplifyQuery const& SQ,
    unsigned int Depth = 0);

Description

Return false if we can prove that the specified FP value's sign bit is 0. Return true if we can prove that the specified FP value's sign bit is 1. Otherwise return std::nullopt.

Return Value

Known sign bit, or nullopt if it cannot be proven.

Parameters

NameDescription
VFloating-point value whose sign bit is queried.
SQSimplify query providing context for the analysis.
DepthCurrent recursion depth for this query.