llvm-project/clang/test/CodeGenOpenCL
Sameer Sahasrabuddhe a75db66eee Restores r228382, which was reverted in r228406.
The original commit failed to handle "shift assign" (<<=), which
broke the test mentioned in r228406. This is now fixed and the
test added to the lit tests under SemaOpenCL.

*** Original commit message from r228382 ***

OpenCL: handle shift operator with vector operands

Introduce a number of checks:
1. If LHS is a scalar, then RHS cannot be a vector.
2. Operands must be of integer type.
3. If both are vectors, then the number of elements must match.

Relax the requirement for "usual arithmetic conversions":
When LHS is a vector, a scalar RHS can simply be expanded into a
vector; OpenCL does not require that its rank be lower than the LHS.
For example, the following code is not an error even if the implicit
type of the constant literal is "int".

  char2 foo(char2 v) { return v << 1; }

Consolidate existing tests under CodeGenOpenCL, and add more tests
under SemaOpenCL.

llvm-svn: 230464
2015-02-25 05:48:23 +00:00
..
2011-04-15-vec-init-from-vec.cl
addr-space-struct-arg.cl Prune CRLF. 2014-10-27 12:37:26 +00:00
address-space-constant-initializers.cl OpenCL: Emit global variables in the constant addr space as constant globals 2014-10-16 15:29:19 +00:00
address-spaces-conversions.cl OpenCL: fix test for lack of names in release builds 2014-11-26 22:33:04 +00:00
address-spaces-mangling.cl Remove the -cxx-abi command-line flag. 2014-01-14 19:35:09 +00:00
address-spaces.cl
amdgpu-num-gpr-attr.cl R600: Handle amdgcn triple 2015-01-06 20:34:47 +00:00
builtins-r600.cl Add __builtin_amdgpu_class 2015-01-06 23:14:57 +00:00
cl-strict-aliasing.cl Revert r229409: "Hack to try deleting file from build bots" 2015-02-16 18:03:59 +00:00
const-str-array-decay.cl Fix an address space id reset with array decay's 2014-12-19 18:04:27 +00:00
constant-addr-space-globals.cl OpenCL: Emit global variables in the constant addr space as constant globals 2014-10-16 15:29:19 +00:00
denorms-are-zero.cl Driver: Implement -cl-denorms-are-zero 2014-08-21 13:58:36 +00:00
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 IR: Make metadata typeless in assembly, clang side 2014-12-15 19:10:08 +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 IR: Make metadata typeless in assembly, clang side 2014-12-15 19:10:08 +00:00
kernel-attributes.cl IR: Make metadata typeless in assembly, clang side 2014-12-15 19:10:08 +00:00
kernel-metadata.cl IR: Make metadata typeless in assembly, clang side 2014-12-15 19:10:08 +00:00
local-initializer-undef.cl Emit OpenCL local global variables without zeorinitializer 2014-11-03 16:51:53 +00:00
local.cl Emit OpenCL local global variables without zeorinitializer 2014-11-03 16:51:53 +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 clang/test/CodeGenOpenCL/opencl_types.cl: Appease i686-msvc. 2014-11-30 00:32:02 +00:00
ptx-calls.cl IR: Make metadata typeless in assembly, clang side 2014-12-15 19:10:08 +00:00
ptx-kernels.cl IR: Make metadata typeless in assembly, clang side 2014-12-15 19:10:08 +00:00
relaxed-fpmath.cl OpenCL C: Add support for a set of floating point 2014-12-10 16:41:14 +00:00
shifts.cl Restores r228382, which was reverted in r228406. 2015-02-25 05:48:23 +00:00
single-precision-constant.cl FP_CONTRACT: Fix two tests for -Asserts. 2012-10-02 16:36:54 +00:00
spir-calling-conv.cl Re-apply "r226548 - Introduce SPIR calling conventions" reverted in r226558. 2015-01-20 11:20:41 +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: Emit global variables in the constant addr space as constant globals 2014-10-16 15:29:19 +00:00
vectorLoadStore.cl Remove names from the CHECK lines. 2012-08-16 00:22:16 +00:00
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