hanchenye-llvm-project/clang/test/CodeGenOpenCL
Joey Gouly cf4143b55e Fix a crash in EmitStoreThroughExtVectorComponentLValue for vectors of odd sizes.
In OpenCL a vector of 3 elements, acts like a vector of four elements.
So for a vector of size 3 the '.hi' and '.odd' accessors, would access
the elements {2, 3} and {1, 3} respectively.
However, in EmitStoreThroughExtVectorComponentLValue we are still operating on
a vector of size 3, so we should only access {2} and {1}. We do this by checking
the last element to be accessed, and ignore it if it is out-of-bounds.

EmitLoadOfExtVectorElementLValue doesn't have a similar problem, because it does
a direct shufflevector with undef, so an out-of-bounds access just gives an undef
value.

Patch by Anastasia Stulova!

llvm-svn: 195367
2013-11-21 17:09:05 +00:00
..
2011-04-15-vec-init-from-vec.cl
addr-space-struct-arg.cl
address-spaces-mangling.cl Certain multi-platform languages, such as OpenCL, have the concept of 2013-09-13 12:04:22 +00:00
address-spaces.cl
event_t.cl
ext-vector-shuffle.cl
fpmath.cl
half.cl
kernel-arg-info.cl
kernel-attributes.cl
kernel-metadata.cl
local.cl Certain multi-platform languages, such as OpenCL, have the concept of 2013-09-13 12:04:22 +00:00
logical-ops.cl
opencl_types.cl
ptx-calls.cl
ptx-kernels.cl
shifts.cl
single-precision-constant.cl
spir32_target.cl
spir64_target.cl
str_literals.cl [OpenCL] Make sure we put string literals in the constant address space. 2013-11-14 18:26:10 +00:00
vectorLoadStore.cl
vector_literals_nested.cl
vector_literals_valid.cl
vector_logops.cl
vector_odd.cl Fix a crash in EmitStoreThroughExtVectorComponentLValue for vectors of odd sizes. 2013-11-21 17:09:05 +00:00