[LLVMdev] [RFC] Integer Saturation Intrinsics

David Majnemer david.majnemer at gmail.com
Thu Jan 15 03:10:43 PST 2015


On Thu, Jan 15, 2015 at 3:02 AM, David Chisnall <David.Chisnall at cl.cam.ac.uk
> wrote:

> On 15 Jan 2015, at 10:51, David Majnemer <david.majnemer at gmail.com> wrote:
> >
> > I don't think this should be a flag on add.  Flags are designed such
> that the middle-end may be ignorant of them and nothing bad might happen,
> it is always safe to ignore or drop flags when doing so is convenient (for
> a concrete example, take a look at reassociate).
>
> This is true of metadata, not of flags.  Consider the atomic memory order
> on loads and stores, for example.  It is definitely not safe for an
> optimiser to ignore these.
>

The arithmetic operations are *very* consistent that flags imply a
relaxation of constraint: floating point has fast math flags, division has
exact, etc.
Memory instructions seem to have gone in the other direction.


>
> David
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150115/c6e13d87/attachment.html>


More information about the llvm-dev mailing list