[cfe-commits] NEON vector alignment

Sandeep Patel deeppatel1987 at gmail.com
Mon Apr 4 15:28:12 PDT 2011


On Mon, Apr 4, 2011 at 9:18 PM, Bob Wilson <bob.wilson at apple.com> wrote:
>
> On Apr 4, 2011, at 2:12 PM, Sandeep Patel wrote:
>
>> On Mon, Apr 4, 2011 at 4:58 PM, Bob Wilson <bob.wilson at apple.com> wrote:
>>>
>>> On Mar 31, 2011, at 2:06 PM, Sandeep Patel wrote:
>>>
>>>> Clang aligns NEON vectors differently than llvm-gcc does.
>>>>
>>>> llvm-gcc actually calls into ARMTargetMachine to get the layout, but
>>>> Clang provides it's own definitions.
>>>>
>>>> llvm-gcc's definition appears to be correct, so this changes Clang to that.
>>>
>>> Thanks, Sandeep.  While reviewing your patch, I noticed that further changes were needed for the APCS ABI, so I went ahead and made those changes as well.  Committed as svn r128825.
>>>
>>
>> Now that you made me look at the parts beyond v128 :-), I'm doubting
>> the AACPS values for i1,i8, and i16.
>>
>> The layouts in ARMTargetMachine.cpp for ARM don't have these smaller
>> integer types listed at all. Should they be explicit?
>
> I think it's OK.  The ThumbTargetMachine versions have the small integer types listed explicitly because they increase the preferred alignment.  I assume there's a good reason for that, but I don't know what it is.

If Thumb had different alignments from ARM, it would be worth a
comment, right? Since there isn't one, that makes me think it's just a
mistake.

(digs through revision history) Looks like r33722 is the reason.

deep




More information about the cfe-commits mailing list