[LLVMdev] Proposal: intp type
clattner at apple.com
Wed Nov 11 12:56:28 CST 2009
On Nov 11, 2009, at 10:20 AM, heisenbug wrote:
> On 10 Nov., 15:10, me22 <me22... at gmail.com> wrote:
>> 2009/11/9 Kenneth Uildriks <kenneth... at gmail.com>:
>>> 1. Conversions to/from other integer types: right now, integer type
>>> conversions are always explicity specified as either a trunc, a sext,
>>> or a zext. Since the size of intp is not known at IR generation time,
>>> you can't know whether a conversion to/from intp truncates or extends.
>> Now that there are arbitrary-sized integers, couldn't you zext to i256
>> then trunc down again, and later let the folder simplify as
> This is not correct, because i256 occupies too much space in
> structures, etc.
If you're storing it in a structure, just cast it back to an i8* and store it as i8*.
More information about the LLVMdev