llvm::simplifySubInst

Given operands for a Sub, fold the result or return null.

Synopsis

Declared in <llvm/Analysis/InstructionSimplify.h>

Value*
simplifySubInst(
    Value* LHS,
    Value* RHS,
    bool IsNSW,
    bool IsNUW,
    SimplifyQuery const& Q);

Return Value

The folded value, or null if no simplification was found.

Parameters

NameDescription
LHSLeft-hand side operand.
RHSRight-hand side operand.
IsNSWWhether the sub has the nsw flag.
IsNUWWhether the sub has the nuw flag.
QSimplification query providing analyses and flags.