Expand a division into generated integer arithmetic.
Declared in <llvm/Transforms/Utils/IntegerDivision.h>
bool
expandDivision(BinaryOperator* Div);
Generate code to divide two integers, replacing Div with the generated code. This currently generates code similarly to compiler-rt's implementations, but future work includes generating more specialized code when more information about the operands are known. Implements both 32bit and 64bit scalar division.
True if the division was successfully expanded.
| Name | Description |
|---|---|
| Div | The division instruction to replace with expanded code. |