Given an exploded icmp instruction, return true if the comparison only checks the sign bit.

Synopsis

Declared in <llvm/Analysis/ValueTracking.h>

bool
isSignBitCheck(
    ICmpInst::Predicate Pred,
    APInt const& RHS,
    bool& TrueIfSigned);

Description

If it only checks the sign bit, set TrueIfSigned if the result of the comparison is true when the input value is signed.

Return Value

True if the comparison only inspects the sign bit.

Parameters

Name

Description

Pred

ICmp predicate of the exploded comparison.

RHS

Constant right‐hand side of the comparison.

TrueIfSigned

Set to true if a signed input makes the compare true.

Created with MrDocs