Return true if it's free to truncate a value of type Ty1 to type Ty2.

Synopsis

Declared in <llvm/Analysis/TargetTransformInfo.h>

bool
isTruncateFree(
    Type* Ty1,
    Type* Ty2) const;

Description

e.g. On x86 it's free to truncate a i32 value in register EAX to i16 by referencing its sub‐register AX.

Return Value

True if it's free to truncate a value of type Ty1 to type Ty2.

Parameters

Name

Description

Ty1

Source type.

Ty2

Destination type.

Created with MrDocs