Expand a remainder into generated integer arithmetic.

Synopsis

Declared in <llvm/Transforms/Utils/IntegerDivision.h>

bool
expandRemainder(BinaryOperator* Rem);

Description

Generate code to calculate the remainder of two integers, replacing Rem with the generated code. This currently generates code using the udiv expansion, but future work includes generating more specialized code, e.g. when more information about the operands are known. Implements both 32bit and 64bit scalar division.

Return Value

True if the remainder was successfully expanded.

Parameters

Name

Description

Rem

The remainder instruction to replace with expanded code.

Created with MrDocs