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

Duncan Sands baldrick at free.fr
Wed May 1 13:12:54 PDT 2013


On 01/05/13 17:03, edA-qa mort-ora-y wrote:
> 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?

Yes.

Ciao, Duncan.

>
> 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).
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list