Attempt to constant fold a select instruction with the specified operands. The constant result is returned if successful; if not, null is returned.

Synopsis

Declared in <llvm/IR/ConstantFold.h>

Constant*
ConstantFoldSelectInstruction(
    Constant* Cond,
    Constant* V1,
    Constant* V2);

Return Value

The folded constant, or null if the select cannot be folded.

Parameters

Name

Description

Cond

The select condition.

V1

The value selected when Cond is true.

V2

The value selected when Cond is false.

Created with MrDocs