[PATCH] Fix PR15267

Duncan Sands baldrick at free.fr
Wed Feb 20 09:38:45 PST 2013


Hi Hal,

>>>> it sounds like you consider <4 x i1> to be bitpacked in memory,
>>>> like i4.
>>>> Is that right?
>>>
>>> Yes. We need this in order to be consistent with targets that
>>> support mask
>>> registers.
>>
>> while it makes sense to me, can you please document this somewhere
>> and ensure
>> that getTypeAllocSize and friends are fixed (should return 1 byte!).
>
> Also, we need to make sure that global constants are emitted correctly. Currently, if you make a <N x i1> global constant, it will emit each element into a separate byte.

all kinds of codegen stuff is broken for these types.  However even before
getting as far as codegen, there are issues at the IR level (type sizes as
I mentioned, and also passes that get it wrong for these types).  Someone
really needs to audit the IR carefully (I would volunteer but I don't think
I have time), and then take a careful look at codegen (particularly the type
legalization logic; I'm probably the right guy to do that, but...).

Ciao, Duncan.




More information about the llvm-commits mailing list