llvm::TargetLoweringBase::isExtLoad

Return true if a load and a subsequent extend can be combined into a single extending load.

Synopsis

Declared in <llvm/CodeGen/TargetLowering.h>

bool
isExtLoad(
    LoadInst const* Load,
    Instruction const* Ext,
    DataLayout const& DL) const;

Description

Return true if Load and Ext can form an ExtLoad. For example, in AArch64 %L = load i8, i8* %ptr %E = zext i8 %L to i32 can be lowered into one load instruction ldrb w0, [x0]

Return Value

True if a load and a subsequent extend can be combined into a single extending load.

Parameters

NameDescription
LoadLoad instruction or SDNode being queried.
ExtExtension instruction paired with the load.
DLDebug location or data layout, depending on context.