]> git.ipfire.org Git - thirdparty/gcc.git/commit
vect: Don't set excess bits in unform masks
authorAndrew Stubbs <ams@codesourcery.com>
Fri, 20 Oct 2023 15:26:51 +0000 (16:26 +0100)
committerAndrew Stubbs <ams@codesourcery.com>
Fri, 10 Nov 2023 11:54:59 +0000 (11:54 +0000)
commita5922427c29fad177251d89cc946d1c5bfc135eb
tree7cf8fc82c35aa1ea454ec1cfad53004b84c4f726
parente24b0fed9234716c146aaf6f8c1b39170e43a6f3
vect: Don't set excess bits in unform masks

AVX ignores any excess bits in the mask (at least for vector sizes >=8), but
AMD GCN magically uses a larger vector than was intended (the smaller sizes are
"fake"), leading to wrong-code.

This patch fixes amdgcn execution failures in gcc.dg/vect/pr81740-1.c,
gfortran.dg/c-interop/contiguous-1.f90,
gfortran.dg/c-interop/ff-descriptor-7.f90, and others.

gcc/ChangeLog:

* expr.cc (store_constructor): Add "and" operation to uniform mask
generation.
gcc/expr.cc