[LLVMdev] Proposal for Poison Semantics (original) (raw)

John Regehr regehr at cs.utah.edu
Wed Feb 4 09:13:44 PST 2015


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.

John



More information about the llvm-dev mailing list