forked from OSchip/llvm-project
a75db66eee
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 |
||
---|---|---|
.. | ||
address-spaces-conversions-cl2.0.cl | ||
address-spaces.cl | ||
amdgpu-num-register-attrs.cl | ||
array-parameters.cl | ||
cond.cl | ||
endian-attr.cl | ||
event_t.cl | ||
event_t_overload.cl | ||
extension-fp64-cl1.1.cl | ||
extension-fp64.cl | ||
extern.cl | ||
func_ptr.cl | ||
half.cl | ||
init.cl | ||
invalid-constant.cl | ||
invalid-kernel-attrs.cl | ||
invalid-kernel-parameters.cl | ||
invalid-kernel.cl | ||
invalid-logical-ops-1.1.cl | ||
invalid-logical-ops-1.2.cl | ||
lit.local.cfg | ||
optional-core-fp64-cl1.2.cl | ||
optional-core-fp64-cl2.0.cl | ||
sampler_t.cl | ||
sampler_t_overload.cl | ||
shifts.cl | ||
sizeof.cl | ||
storageclass.cl | ||
str_literals.cl | ||
unsupported.cl | ||
vec_compare.cl | ||
vec_step.cl | ||
vector_conv_invalid.cl | ||
vector_inc_dec_ops.cl | ||
vector_literals_const.cl | ||
vector_literals_invalid.cl | ||
warn-missing-prototypes.cl |