title: The poison value and undefined value in LLVM
body: <p>LLVM introduces the concept of "poison value", which I never feel sure  to understand.  For example, for the statement </p>
  
  <pre><code>%add = add nsw i32 %x, 1
  </code></pre>
  
  <p>If <code>%x+1</code> is strictly larger than the largest i32 integer, an arbitrary value is to be assigned to %add. Is that correct to claim that the statement above, i.e.   <code>%add = add nsw i32 %x, 1</code>,  can be  semantically described as:</p>
  
  <pre><code>if (%x+1) overflows then %add = undef else %add = add i32 %x,1
  </code></pre>
  
  <p>?</p>