forked from OSchip/llvm-project
6781fee085
Permitting non-standards-driven "do the best you can" constant-folding of array bounds is permitted solely as a GNU compatibility feature. We should not be doing it in any language mode that is attempting to be conforming. From https://reviews.llvm.org/D20090 it appears the intent here was to permit `__constant int` globals to be used in array bounds, but the change in that patch only added half of the functionality necessary to support that in the constant evaluator. This patch adds the other half of the functionality and turns off constant folding for array bounds in OpenCL. I couldn't find any spec justification for accepting the kinds of cases that D20090 accepts, so a reference to where in the OpenCL specification this is permitted would be useful. Note that this change also affects the code generation in one test: because after 'const int n = 0' we now treat 'n' as a constant expression with value 0, it's now a null pointer, so '(local int *)n' forms a null pointer rather than a zero pointer. Reviewed By: Anastasia Differential Revision: https://reviews.llvm.org/D89520 |
||
---|---|---|
.. | ||
access-qualifier.cl | ||
address-spaces-conversions-cl2.0.cl | ||
address-spaces.cl | ||
amdgpu-attrs.cl | ||
arithmetic-conversions.cl | ||
arm-integer-dot-product.cl | ||
array-init.cl | ||
array-parameters.cl | ||
as_type.cl | ||
atomic-init.cl | ||
atomic-ops.cl | ||
block-array-capturing.cl | ||
bool-vectors.cl | ||
builtin.cl | ||
builtins-amdgcn-error-ci.cl | ||
builtins-amdgcn-error-f16.cl | ||
builtins-amdgcn-error-flat-address-space.cl | ||
builtins-amdgcn-error-gfx9.cl | ||
builtins-amdgcn-error-gfx10-param.cl | ||
builtins-amdgcn-error-gfx10.cl | ||
builtins-amdgcn-error-gfx908-param.cl | ||
builtins-amdgcn-error-vi.cl | ||
builtins-amdgcn-error.cl | ||
cl20-device-side-enqueue.cl | ||
clang-builtin-version.cl | ||
clk_event_t.cl | ||
cond.cl | ||
convergent.cl | ||
endian-attr.cl | ||
event_t.cl | ||
event_t_overload.cl | ||
ext_vectors.cl | ||
extension-begin.cl | ||
extension-begin.h | ||
extension-version.cl | ||
extensions.cl | ||
fdeclare-opencl-builtins.cl | ||
format-strings-fixit.cl | ||
fp-options.cl | ||
func.cl | ||
half.cl | ||
images.cl | ||
init.cl | ||
intel-subgroup-avc-ext-types.cl | ||
invalid-assignment-constant-address-space.cl | ||
invalid-block.cl | ||
invalid-constant.cl | ||
invalid-image.cl | ||
invalid-kernel-attrs.cl | ||
invalid-kernel-parameters.cl | ||
invalid-kernel.cl | ||
invalid-pipe-builtin-cl2.0.cl | ||
invalid-pipes-cl2.0.cl | ||
lit.local.cfg | ||
logical-ops.cl | ||
multistep-explicit-cast.cl | ||
nosvm.cl | ||
null_literal.cl | ||
null_queue.cl | ||
numbered-address-space.cl | ||
pipes-1.2-negative.cl | ||
predefined-expr.cl | ||
printf-format-string-warnings.cl | ||
printf-format-strings.cl | ||
queue_t_overload.cl | ||
recovery-expr.cl | ||
sampler_t.cl | ||
sampler_t_overload.cl | ||
shifts.cl | ||
sizeof.cl | ||
storageclass-cl20.cl | ||
storageclass.cl | ||
str_literals.cl | ||
to_addr_builtin.cl | ||
types.cl | ||
unroll-hint.cl | ||
unsupported.cl | ||
usm-address-spaces-conversions.cl | ||
vec_compare.cl | ||
vec_step.cl | ||
vector_conv_invalid.cl | ||
vector_inc_dec_ops.cl | ||
vector_literals_invalid.cl | ||
vector_swizzle_length.cl | ||
warn-missing-prototypes.cl |