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

Name

Description

Cond

Select condition.

TrueVal

Value selected when the condition is true.

FalseVal

Value selected when the condition is false.

FMF

Fast‐math flags to honor while folding.

Q

Simplification query providing analyses and flags.

Created with MrDocs