diff options
author | Andrew Stubbs <ams@baylibre.com> | 2025-07-11 13:41:19 +0000 |
---|---|---|
committer | Andrew Stubbs <ams@baylibre.com> | 2025-07-30 12:57:13 +0000 |
commit | 476ff6a043c3aad033e9b450172dbe7621ff3157 (patch) | |
tree | 88c3d161d87883dfc4e19ca5a468d403ebb02783 /gcc/coverage.c | |
parent | 5b9cd5086db9e24c2c7db8b0140482670af04e28 (diff) | |
download | gcc-476ff6a043c3aad033e9b450172dbe7621ff3157.zip gcc-476ff6a043c3aad033e9b450172dbe7621ff3157.tar.gz gcc-476ff6a043c3aad033e9b450172dbe7621ff3157.tar.bz2 |
amdgcn: Don't clobber VCC if we don't need to
This is a hold-over from GCN3 where v_add always wrote to the condition
register, whether you wanted it or not. This hasn't been true since GCN5, and
we dropped support for GCN3 a little while ago, so let's fix it.
There was actually a latent bug here because some other post-reload splitters
were generating v_add instructions without declaring the VCC clobber (at least
mul did this), so this should fix some wrong-code bugs also.
gcc/ChangeLog:
* config/gcn/gcn-valu.md (add<mode>3<exec_clobber>): Rename ...
(add<mode>3<exec>): ... to this, remove the clobber, and change the
instruction from v_add_co_u32 to v_add_u32.
(add<mode>3_dup<exec_clobber>): Rename ...
(add<mode>3_dup<exec>): ... to this, and likewise.
(sub<mode>3<exec_clobber>): Rename ...
(sub<mode>3<exec>): ... to this, and likewise
* config/gcn/gcn.md (addsi3): Remove the DI clobber, and change the
instruction from v_add_co_u32 to v_add_u32.
(addsi3_scc): Likewise.
(subsi3): Likewise, but for v_sub_co_u32.
(muldi3): Likewise.
(cherry picked from commit 0eee2dd2865faf61d9d74425510421e20434ec03)
Diffstat (limited to 'gcc/coverage.c')
0 files changed, 0 insertions, 0 deletions