Attempt to constant fold an insertelement instruction with the specified operands and indices.

Synopsis

Declared in <llvm/IR/ConstantFold.h>

Constant*
ConstantFoldInsertElementInstruction(
    Constant* Val,
    Constant* Elt,
    Constant* Idx);

Description

The constant result is returned if successful; if not, null is returned.

Return Value

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

Parameters

Name

Description

Val

The vector constant to insert into.

Elt

The element value to insert.

Idx

The element index.

Created with MrDocs