Oops, please consider this patch as submitted from my @codesourcery.com address, for copyright assignment purposes.

Andrew

On 06/12/2019 17:31, Andrew Stubbs wrote:
Hi all,

This patch re-enables the V64QImode and V64HImode for GCN.

GCC does not make these easy to work with because there is (was?) an assumption that vector registers do not have excess bits in vector registers, and therefore does not need to worry about truncating or extending smaller types, when  vectorized. This is not true on GCN where each vector lane is always at least 32-bits wide, so we only really implement loading at storing these vectors modes (for now).

These modes were originally disabled because, previously, the GCC vectorizer would "lock" into the first vector register size that it encountered in a region, and would refuse to vectorize any type that didn't match that size in the rest of that region. On GCN, where all types have the same number of lanes, and therefore different bit-sizes, this meant that allowing QImode or HImode could prevent it vectorizing SImode or DImode, which are the ones we really want vectorized.

Now that Richard Sandiford has introduced TARGET_VECTORIZE_RELATED_MODE this issue has now been removed, and we can re-enable the vector types once more. Thanks Richard! :-)

This change results in 207 new passes in the vect.exp (there's also 41 new fails, but those are exposed bugs I'll fix shortly). Some of these were internal compiler errors that did not exist in older compilers.


Reply via email to