[PATCH][OpenCL] Fixing the crash in clang due to .hi and .odd accesses in vectors of odd size

Pekka Jääskeläinen pekka.jaaskelainen at tut.fi
Thu Nov 21 01:29:41 PST 2013


Hi,

On 11/20/2013 05:11 PM, Anastasia Stulova wrote:
> +typedef unsigned char __attribute__((ext_vector_type(3))) uchar3;
> +
> +kernel void test_odd_vector1 (uchar3 lhs_lvalue)
> +{
> +	lhs_lvalue.odd = 1;
> +}
> +
> +kernel void test_odd_vector2 (uchar3 lhs_lvalue)
> +{
> +	lhs_lvalue.hi = 2;
> +}

Should these also test that the contents end up being correct,
just in case?

Nitpick: the coding style of the test case functions
might not match the LLVM coding style.

Otherwise, LGTM.

-- 
Pekka




More information about the cfe-commits mailing list