llvm::SCEVExpander::canReuseFlagsFromOriginalIVInc

Return true if original and wide IV increments can share poison flags.

Synopsis

Declared in <llvm/Transforms/Utils/ScalarEvolutionExpander.h>

static
bool
canReuseFlagsFromOriginalIVInc(
    PHINode* OrigPhi,
    PHINode* WidePhi,
    Instruction* OrigInc,
    Instruction* WideInc);

Description

Both increments must directly increment the corresponding IV PHI nodes and have the same opcode. It is not safe to re-use the flags from the original increment, if it is more complex and SCEV expansion may have yielded a more simplified wider increment.

Return Value

True if the original and wide IV increments can share poison flags.

Parameters

NameDescription
OrigPhiOriginal induction-variable PHI.
WidePhiWidened induction-variable PHI.
OrigIncOriginal IV increment instruction.
WideIncWidened IV increment instruction.