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 |
||
---|---|---|
.. | ||
2011-04-15-vec-init-from-vec.cl | ||
addr-space-struct-arg.cl | ||
address-space-constant-initializers.cl | ||
address-spaces-conversions.cl | ||
address-spaces-mangling.cl | ||
address-spaces.cl | ||
amdgpu-num-gpr-attr.cl | ||
builtins-r600.cl | ||
cl-strict-aliasing.cl | ||
const-str-array-decay.cl | ||
constant-addr-space-globals.cl | ||
denorms-are-zero.cl | ||
event_t.cl | ||
ext-vector-shuffle.cl | ||
fpmath.cl | ||
half.cl | ||
kernel-arg-info.cl | ||
kernel-attributes.cl | ||
kernel-metadata.cl | ||
local-initializer-undef.cl | ||
local.cl | ||
logical-ops.cl | ||
opencl_types.cl | ||
ptx-calls.cl | ||
ptx-kernels.cl | ||
relaxed-fpmath.cl | ||
shifts.cl | ||
single-precision-constant.cl | ||
spir-calling-conv.cl | ||
spir32_target.cl | ||
spir64_target.cl | ||
str_literals.cl | ||
vectorLoadStore.cl | ||
vector_literals_nested.cl | ||
vector_literals_valid.cl | ||
vector_logops.cl | ||
vector_odd.cl |