[cfe-commits] r134946 - in /cfe/trunk: lib/CodeGen/TargetInfo.cpp test/CodeGen/x86_64-arguments.c

Eli Friedman eli.friedman at gmail.com
Tue Jul 12 14:21:41 PDT 2011


On Tue, Jul 12, 2011 at 2:13 PM, Bill Wendling <wendling at apple.com> wrote:
> On Jul 11, 2011, at 5:37 PM, Eli Friedman wrote:
>
>> On Mon, Jul 11, 2011 at 5:30 PM, Bruno Cardoso Lopes
>> <bruno.cardoso at gmail.com> wrote:
>>> Author: bruno
>>> Date: Mon Jul 11 19:30:27 2011
>>> New Revision: 134946
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=134946&view=rev
>>> Log:
>>> Fix one x86_64 abi issue and the test to actually look for the right thing,
>>> which is: { <4 x float>, <4 x float> } should continue to go through memory.
>>>
>>> Modified:
>>>    cfe/trunk/lib/CodeGen/TargetInfo.cpp
>>>    cfe/trunk/test/CodeGen/x86_64-arguments.c
>>>
>>> Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=134946&r1=134945&r2=134946&view=diff
>>> ==============================================================================
>>> --- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
>>> +++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Mon Jul 11 19:30:27 2011
>>> @@ -1228,6 +1228,13 @@
>>>
>>>     const RecordDecl *RD = RT->getDecl();
>>>
>>> +    // The only case a 256-bit wide vector could be used is when the struct
>>> +    // contains a single 256-bit element. Since Lo and Hi logic isn't extended
>>> +    // to work for sizes wider than 128, early check and fallback to memory.
>>> +    RecordDecl::field_iterator FirstElt = RD->field_begin();
>>> +    if (Size > 128 && getContext().getTypeSize(FirstElt->getType()) != 256)
>>> +      return;
>>
>> What if FirstElt is a struct/array/etc?
>>
> This change is causing clang to fail to compile itself. I'm coming up with a testcase.

Bruno already has one, but thanks for offering. :)

-Eli




More information about the cfe-commits mailing list