]> git.ipfire.org Git - thirdparty/gcc.git/commit
vect: WORKAROUND vectorizer bug
authorAndrew Stubbs <ams@codesourcery.com>
Fri, 21 Oct 2022 13:19:31 +0000 (14:19 +0100)
committerAndrew Stubbs <ams@codesourcery.com>
Mon, 24 Oct 2022 16:18:18 +0000 (17:18 +0100)
commit2a0dc45c854448ec4628dab5c6c08999a5cf3fe5
tree821a92075b6e11e35c85147733fa8ccd0bfd427a
parent0889dd6912c8550e113d8b5417fd65291316209c
vect: WORKAROUND vectorizer bug

This patch disables vectorization of memory accesses to non-default address
spaces where the pointer size is different to the usual pointer size.  This
condition typically occurs in OpenACC programs on amdgcn, where LDS memory is
used for broadcasting gang-private variables between threads. In particular,
see libgomp.oacc-c-c++-common/private-variables.c

The problem is that the address space information is dropped from the various
types in the middle-end and eventually it triggers an ICE trying to do an
address conversion.  That ICE can be avoided by defining
POINTERS_EXTEND_UNSIGNED, but that just produces wrong RTL code later on.

A correct solution would ensure that all the vectypes have the correct address
spaces, but I don't have time for that right now.

gcc/ChangeLog:

* tree-vect-data-refs.cc (vect_analyze_data_refs): Workaround an
address-space bug.
gcc/ChangeLog.omp
gcc/tree-vect-data-refs.cc