]> git.ipfire.org Git - thirdparty/gcc.git/commit
amdgcn: Fix vector compare modes
authorAndrew Stubbs <ams@codesourcery.com>
Tue, 17 Mar 2020 12:49:19 +0000 (12:49 +0000)
committerAndrew Stubbs <ams@codesourcery.com>
Wed, 18 Mar 2020 12:53:26 +0000 (12:53 +0000)
commitdbde9e2d5952ff1c50c4aeaaabb23cebafb50759
tree10575e9e6ce584de02602c55d378d2116488b49f
parent5a80a6c3e5f800de63a2eadd8ae3e6822172a718
amdgcn: Fix vector compare modes

The GCN VCC register has 64 CC values in one registers, one bit for each
vector lane.

Previously we avoided problems with invalid optimizations by not declaring
a mode for the comparison operators, but it turns out that causes other
problems (and build warnings).

Instead, the optimization issues can be avoided by setting
STORE_REGISTER_VALUE to -1, meaning that all the bits are significant.

(It would be better if we could set STORE_REGISTER_VALUE according to the
known mask or vector size, but we can't.)

2020-03-18  Andrew Stubbs  <ams@codesourcery.com>

gcc/
* config/gcn/gcn-valu.md (vec_cmp<mode>di): Set operand 1 to DImode.
(vec_cmp<mode>di_dup): Likewise.
* config/gcn/gcn.h (STORE_FLAG_VALUE): Set to -1.
gcc/ChangeLog
gcc/config/gcn/gcn-valu.md
gcc/config/gcn/gcn.h