llvm::UpgradeBitCastInst

This is an auto-upgrade for bitcast between pointers with different address spaces: the instruction is replaced by a pair ptrtoint+inttoptr.

Synopsis

Declared in <llvm/IR/AutoUpgrade.h>

Instruction*
UpgradeBitCastInst(
    unsigned int Opc,
    Value* V,
    Type* DestTy,
    Instruction*& Temp);

Return Value

The inttoptr instruction when an upgrade is performed, or null.

Parameters

NameDescription
OpcOpcode of the cast being considered.
VSource value of the bitcast.
DestTyDestination type of the bitcast.
TempSet to the ptrtoint instruction when an upgrade is performed.