llvm::InstCombiner::canBeCastedExactlyIntToFP

Return true if V can be cast exactly to floating-point type FPTy.

Synopsis

Declared in <llvm/Transforms/InstCombine/InstCombiner.h>

bool
canBeCastedExactlyIntToFP(
    Value* V,
    Type* FPTy,
    bool IsSigned,
    Instruction const* CxtI = nullptr) const;

Return Value

True if the integer-to-FP cast does not lose precision.

Parameters

NameDescription
VInteger value being cast.
FPTyDestination floating-point type.
IsSignedWhether V is treated as a signed integer.
CxtIOptional context instruction for local analysis.