ΒΆllvm::Value* createSelectCmpOp(
    llvm::IRBuilderBase& Builder,
    llvm::Value* StartVal,
    llvm::RecurKind RK,
    llvm::Value* Left,
    llvm::Value* Right)

Description

See RecurrenceDescriptor::isSelectCmpPattern for a description of the pattern we are trying to match. In this pattern we are only ever selecting between two values: 1) an initial PHI start value, and 2) a loop invariant value. This function uses \p LoopExitInst to determine 2), which we then use to select between \p Left and \p Right. Any lane value in \p Left that matches 2) will be merged into \p Right.

Declared at: llvm/include/llvm/Transforms/Utils/LoopUtils.h:362

Parameters

llvm::IRBuilderBase& Builder
llvm::Value* StartVal
llvm::RecurKind RK
llvm::Value* Left
llvm::Value* Right