llvm::APInt::truncSSatU

Truncate to a new width with signed saturation to an unsigned result.

Synopsis

Declared in <llvm/ADT/APInt.h>

APInt
truncSSatU(unsigned int width) const;

Description

If this APInt, treated as signed, can be losslessly truncated, return the truncated value; otherwise return zero (if negative) or unsigned max. If width matches the current bit width then no changes are made.

Return Value

This value truncated to width with signed-to-unsigned saturation.

Parameters

NameDescription
widthNew bit width