llvm::MachineIRBuilder::buildTruncUSatU

Build and insert Res = G_TRUNC_USAT_U Op

Synopsis

Declared in <llvm/CodeGen/GlobalISel/MachineIRBuilder.h>

MachineInstrBuilder
buildTruncUSatU(
    DstOp const& Res,
    SrcOp const& Op);

Description

G_TRUNC_USAT_U truncates the unsigned input, Op, to an unsigned result with saturation.

Return Value

The newly created instruction.

Parameters

NameDescription
ResDestination operand for the result.
OpSource operand.

Preconditions

  • setBasicBlock or setMI must have been called.
  • Res must be a generic virtual register with scalar or vector type.
  • Op must be a generic virtual register with scalar or vector type.