LLVM introduces the concept of "poison value", which I never feel sure to understand. For example, for the statement
%add = add nsw i32 %x, 1
If %x+1
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. %add = add nsw i32 %x, 1
, can be semantically described as:
if (%x+1) overflows then %add = undef else %add = add i32 %x,1
?