Fold an intrinsic call with target‐dependent constant folding.

Synopsis

Declared in <llvm/Analysis/TargetFolder.h>

virtual
Value*
FoldIntrinsic(
    Intrinsic::ID ID,
    ArrayRef<Value*> Ops,
    Type* Ty,
    FastMathFlags FMF = {},
    Function* CxtF = nullptr) const override;

Return Value

The folded value, or nullptr if the operation cannot be folded.

Parameters

Name

Description

ID

The intrinsic identifier.

Ops

The intrinsic operands.

Ty

The result type of the intrinsic.

FMF

Fast‐math flags for the call.

CxtF

Optional context function for the intrinsic.

Created with MrDocs