[LLVMdev] Signed/Unsigned Instruction selection.

Matt Arsenault arsenm2 at gmail.com
Wed Jul 9 01:31:53 PDT 2014


On Jul 9, 2014, at 1:08 AM, Arsen Hakobyan <artinetstudio at gmail.com> wrote:

> The sign information for binary operators is available in the llvm IR by the
> 'nsw' (no signed wrap) flag. Seems there is no use of this flag in the code
> generation phase.
> The sign information is no more available in the selection DAG.
> So how can I generate different instructions for binary operators with
> signed/unsigned operands in the assembler (e.g. mul/mulu)?

It actually is, although it’s a relatively recent addition. See BinaryWithFlagsSDNode



More information about the llvm-dev mailing list