[LLVMdev] Proposal for Poison Semantics

David Majnemer david.majnemer at gmail.com
Wed Feb 4 10:26:16 PST 2015


On Wed, Feb 4, 2015 at 9:13 AM, John Regehr <regehr at cs.utah.edu> wrote:

> I think such a thing would be great.  However, there is a problem that the
>> RFC wasn't aware of when it was
>> written:
>>
>> consider:
>> %S = select %A, %B, undef
>>
>> without us knowing anything about %A or %B, we will replace all uses of
>> %S with %B.  This transform would be
>> considered wrong with the RFC in mind.
>>
>> If this transform was valid, there could not be any value or value-like
>> property in LLVM with semantics more
>> powerful than undef.  This makes me think that what LLVM *actually*
>> implements is not poison or something like
>> it.
>>
>
> Is it possible that the new weaker poison subsumes undef?  The interaction
> between these different but related UB-like concepts is confusing at best.


I am actively working towards removing poison altogether.  I think a more
accurate model of LLVM's wrapping flags is not poison but instead something
akin to the fast-math flags on floating point instructions.


>
>
> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150204/a8dbeecb/attachment.html>


More information about the llvm-dev mailing list