llvm::simplifyIntrinsic

Given operands for an intrinsic, fold the result or return null.

Synopsis

Declared in <llvm/Analysis/InstructionSimplify.h>

Value*
simplifyIntrinsic(
    Intrinsic::ID IID,
    Type* ReturnType,
    ArrayRef<Value*> Args,
    FastMathFlags FMF,
    SimplifyQuery const& Q,
    Function* CxtF = nullptr,
    fp::ExceptionBehavior ExBehavior = fp::ebIgnore,
    RoundingMode Rounding = RoundingMode::NearestTiesToEven);

Description

Context Function is passed as CxtF. ExBehavior and Rounding only apply to constrained FP intrinsics.

Return Value

The folded value, or null if no simplification was found.

Parameters

NameDescription
IIDIntrinsic identifier.
ReturnTypeReturn type of the intrinsic.
ArgsOperand values of the intrinsic.
FMFFast-math flags to honor while folding.
QSimplification query providing analyses and flags.
CxtFOptional context function for the intrinsic.
ExBehaviorFloating-point exception behavior to assume.
RoundingRounding mode to assume.