On Tue, Sep 27, 2011 at 4:17 AM, Anton Lokhmotov
<[email protected]> wrote:
> Hi Eli,
>
> Thanks for your prompt review.
>
>> It looks like you included some diffs you didn't mean to include?
>> (The changes to lib/AST/Expr.cpp and the first set of changes to
>> lib/AST/ExprConstant.cpp.)
> This code is necessary for Clang to recognise that a vector literal with a
> nested constant initializer is constant.

All of your tests pass without those changes... are they necessary for
some other reason I'm missing?

>> I follow the concept of your patch, but it looks like you're deleting
>> a bunch of necessary code from lib/AST/ExprConstant.cpp.  Do we really
>> not have proper tests for those cases?
> The removed code only works when the number of initializers is 1 or exactly
> equal to the number of vector elements.  Our code is more generic, as it
> allows nested vector initializers (see OpenCL 6.1.6).  The added tests cover
> all possible uses.

Your patch breaks the following:

typedef int i4 __attribute((vector_size(16)));
i4 x = (i4){1,2};

It takes out the code that would otherwise pad the vector with zeros.

-Eli

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to