This patch avoids emitting __kmpc_alloc_shared allocation calls for implicitly cast variables which are CK_ArrayToPointerDecay that are not having their address taken explicitly.
Note: if the condition should be refined instead of removed then I am looking for suggestions as to how to keep the check for CK_ArrayToPointerDecay but restrict its applicability with further conditions. It is not clear to me what those conditions could be hence the complete removal of the condition. So far none of the existing lit tests needed to be changed as a consuquence of this change and no LLVM/OpenMP tests have failed.
OpenMP-Opt is usually able to transform the __kmpc_alloc_shared calls emitted this way to allocas except in this case the size of the allocated local array (256) is preventing that from happening (limit is 128).
I think you need to check that the array is allocated in the parallel context, otherwise there might be a crash, if it is allocated in the target context and many threads would like to access it.