We should just have no-wrap flags for trunc and ext, i think:
-
trunc nsw
== at most, only sign bits are lost during truncation, no non-sign bits are lost. -
trunc nuw
== no set bits are lost -
zext nsw
== arithmetic value does not change, we are actually padding with the sign bit, “thiszext
is ansext
”. -
zext nuw
(implicit) == numeric value does not change, not really useful. -
sext nsw
(implicit) == arithmetic value does not change, not really useful. -
sext nuw
== numeric value does not change, we are actually padding with the zero bit, “thissext
is anzext
”.