llvm::matchSimpleTernaryIntrinsicRecurrence

Attempt to match a simple value-accumulating recurrence of the form: %llvm.intrinsic.acc = phi Ty [%Init, %Entry], [%llvm.intrinsic, %backedge] %llvm.intrinsic = call Ty llvm.intrinsic(%OtherOp0, %OtherOp1, %llvm.intrinsic.acc) OR %llvm.intrinsic.acc = phi Ty [%Init, %Entry], [%llvm.intrinsic, %backedge] %llvm.intrinsic = call Ty llvm.intrinsic(%llvm.intrinsic.acc, %OtherOp0, %OtherOp1)

Synopsis

Declared in <llvm/Analysis/ValueTracking.h>

bool
matchSimpleTernaryIntrinsicRecurrence(
    IntrinsicInst const* I,
    PHINode*& P,
    Value*& Init,
    Value*& OtherOp0,
    Value*& OtherOp1);

Description

The recurrence relation is of kind: X_0 = %a (initial value), X_i = call llvm.ternary.intrinsic(X_i-1, %b, %c) Where %b, %c are not required to be loop-invariant.

Parameters

NameDescription
IA wrapper class for inspecting calls to intrinsic functions. This allows the standard isa/dyncast/cast functionality to work with calls to intrinsic functions.
InitLLVM Value Representation
OtherOp0LLVM Value Representation
OtherOp1LLVM Value Representation