[llvm] r221318 - Analysis: Make isSafeToSpeculativelyExecute fire less for divides

David Majnemer david.majnemer at gmail.com
Sat Nov 8 21:53:49 PST 2014


On Sat, Nov 8, 2014 at 9:49 PM, Chandler Carruth <chandlerc at google.com>
wrote:

>
> On Sat, Nov 8, 2014 at 11:43 PM, David Majnemer <david.majnemer at gmail.com>
> wrote:
>
>>
>> I'm pretty sure the LangRef has a bug here.  It cannot literally mean
>> undefined behavior or the program hits UB once an add nsw that produces
>> poison is used as the operand to another add.
>>
>
> Yes this is the known bug in the poison spec. None have wanted to fix it
> because it seems likely better to remove the need for poison by specifying
> (and implementing if necessary) the relevant optimization opportunities in
> terms of undef, which is a much simpler construct.
>

Super +1, the *only* thing stopping me is my inability to come up with
examples where LLVM can optimize because we have poison instead of *just*
undef.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141108/6c841e5a/attachment.html>


More information about the llvm-commits mailing list