[LLVMdev] are non-byte-multiple integers treated as exact?

edA-qa mort-ora-y eda-qa at disemia.com
Wed May 1 08:03:40 PDT 2013

If I create an integer size which is not a native size on the target
platform is it nonetheless treated as though it were that size? That is,
do all the basic operations (add, mul, shift, etc.) do the proper
treatment to ensure it behaves as an exactly sized integer value?

I'm looking at the native assembly output of several examples and it
does appear that some limited handling is done. For example shifting
will artificially wrap the shift amount, but it does not alter the
resulting value.

The "nsw" flag also doesn't change the final assembly, so I assume the
poison value is strictly an optimizer thing (saying it shouldn't assume
the value is well defined).

edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130501/3c2c36be/attachment.sig>

More information about the llvm-dev mailing list