llvm::TargetFolder::FoldIntrinsic

FoldIntrinsic overloads

Synopses

Declared in <llvm/IR/IRBuilderFolder.h>

Fold an intrinsic call if it can be simplified.

virtual
Value*
FoldIntrinsic(
    Intrinsic::ID ID,
    ArrayRef<Value*> Ops,
    Type* Ty,
    FastMathFlags FMF = {},
    Function* CtxF = nullptr) const = 0;
» more...

Fold an intrinsic call with target-dependent constant folding.

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

Return Value

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

Parameters

NameDescription
IDThe intrinsic identifier.
OpsThe intrinsic operands.
TyThe result type of the intrinsic.
FMFFast-math flags for the call.
CtxFOptional context function for the intrinsic.
CxtFOptional context function for the intrinsic.