[committed, amdgcn] Zero-initialise masked load destinations
Andrew Stubbs
ams@codesourcery.com
Fri Jan 31 12:05:00 GMT 2020
This is one of those things I don't know why we didn't notice sooner.
The patch ensures that unused lanes in masked vector loads are
zero-initialized, as per the internals manual.
This fixes an execution failure in testcase gfortran.dg/assumed_rank_1.f90.
When investigating the bug I got confused about the meaning of the
"gather<mode>_exec" define_expand, which doesn't quite fit the pattern
of the other "_exec" instructions. It's only used in one place so I've
inlined it to avoid future confusion. It also reduces the likelihood of
accidentally bypassing the zero-initialization in future.
I also needed a convenient way to create 0.0 vector constants without
uglifying the machine description code, so extending gcn_vec_constant
seemed like a useful place to do it.
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 200131-zero-init-masked-loads.patch
Type: text/x-patch
Size: 3957 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20200131/96a5e4d6/attachment.bin>
More information about the Gcc-patches
mailing list