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 Fix indirect byval passing of records in address spaced memory. Allocate memory on stack, and memcpy the actual value before the call. 2013-03-10 12:59:00 +00:00
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 Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9) 2013-01-20 12:31:11 +00:00
ext-vector-shuffle.cl
fpmath.cl Rename "fpaccuracy" metadata to the more generic "fpmath". That's because I'm 2012-04-14 12:37:26 +00:00
half.cl Add a new LangOpt NativeHalfType. This option allows for native half/fp16 2013-01-23 11:56:20 +00:00
kernel-arg-info.cl Generate metadata to implement the -cl-kernel-arg-info option. 2013-03-24 13:58:12 +00:00
kernel-attributes.cl Don't pass -O0 to clang_cc1, it is the default. 2013-09-04 04:12:25 +00:00
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 Add a 64-bit triple to these tests, to fix 32-bit bots. 2013-02-21 13:42:33 +00:00
opencl_types.cl CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
ptx-calls.cl CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
ptx-kernels.cl CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
shifts.cl r172047 lacked a test (due to incomplete OpenCL support in clang). Use a modified 2013-01-10 10:42:08 +00:00
single-precision-constant.cl FP_CONTRACT: Fix two tests for -Asserts. 2012-10-02 16:36:54 +00:00
spir32_target.cl Fix line ending is tests. No functional change. 2012-12-12 00:52:15 +00:00
spir64_target.cl Fix line ending is tests. No functional change. 2012-12-12 00:52:15 +00:00
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 Remove names from the CHECK lines. 2012-08-16 00:22:16 +00:00
vector_literals_nested.cl Fix test so it doesn't depend on the host's calling convention lowering code. 2012-01-04 20:43:57 +00:00
vector_literals_valid.cl This handles the missing cases of opencl vector literals. 2011-07-15 23:07:01 +00:00
vector_logops.cl A few style changes. 2012-01-19 01:16:16 +00:00
vector_odd.cl Fix a crash in EmitStoreThroughExtVectorComponentLValue for vectors of odd sizes. 2013-11-21 17:09:05 +00:00