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 10:23:43 +0000 (10:23 +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.

gcc/config/gcn/gcn.c

index 3b1762efd3ab2ff363a37316d4e792f3790248a4..2351b24a4d559af8c6ab1cefc5263613811ab8dd 100644 (file)
@@ -4251,7 +4251,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