]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
amdgcn: Allow V64DFmode min/max reductions
authorAndrew Stubbs <ams@codesourcery.com>
Mon, 9 Nov 2020 17:42:34 +0000 (17:42 +0000)
committerAndrew Stubbs <ams@codesourcery.com>
Tue, 26 Jan 2021 11:29:51 +0000 (11:29 +0000)
I don't know why these were disabled. There're no direct min/max DPP
instructions for this mode, but the "use moves" strategy works fine.

gcc/ChangeLog:

* config/gcn/gcn.c (gcn_expand_reduc_scalar): Use move instructions
for V64DFmode min/max reductions.

Backport from d9f50366102a8ca3521e4854f7716bd013c8ea0a.

gcc/config/gcn/gcn.c

index f0e4636c06a9beef8bee045ffdb206b9712c2d8a..095de6a2f7ec7d750b6ccd5e10168932db01e8db 100644 (file)
@@ -4363,7 +4363,8 @@ gcn_expand_reduc_scalar (machine_mode mode, rtx src, int unspec)
                      || unspec == UNSPEC_SMAX_DPP_SHR
                      || unspec == UNSPEC_UMIN_DPP_SHR
                      || unspec == UNSPEC_UMAX_DPP_SHR)
-                    && mode == V64DImode)
+                    && (mode == V64DImode
+                        || mode == V64DFmode))
                    || (unspec == UNSPEC_PLUS_DPP_SHR
                        && mode == V64DFmode));
   rtx_code code = (unspec == UNSPEC_SMIN_DPP_SHR ? SMIN