[LLVMdev] RFC: Proposal for Poison Semantics

Chandler Carruth chandlerc at google.com
Thu Jan 29 22:49:28 PST 2015


On Thu, Jan 29, 2015 at 9:43 PM, Sanjoy Das <sanjoy at playingwithpointers.com>
wrote:

> One way around this is to say that there are some special
> instructions, icmp, sext and zext which produce a value solely
> composed of poison bits if any of their input bits is poison.  So
> `<poison> icmp X` is poison for any value of X, including INT_MAX.
> This is one way poison could be fundamentally different from undef.
>

So far, this is the model I like the best, but I do still have some concern.

The primary concern I have is that with this model, zext is no longer 100%
equivalent to anyext + mask. Much like you say, you *could* implement zext
that way, but once you convert them, the poison is lost.

Maybe that's OK though. I'm curious what others think. I haven't really had
enough time to fully explore this in my head.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150129/318772ed/attachment.html>


More information about the llvm-dev mailing list