llvm::simplifySelectInst

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

Synopsis

Declared in <llvm/Analysis/InstructionSimplify.h>

Value*
simplifySelectInst(
    Value* Cond,
    Value* TrueVal,
    Value* FalseVal,
    FastMathFlags FMF,
    SimplifyQuery const& Q);

Return Value

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

Parameters

NameDescription
CondSelect condition.
TrueValValue selected when the condition is true.
FalseValValue selected when the condition is false.
FMFFast-math flags to honor while folding.
QSimplification query providing analyses and flags.