It was recently discovered that the existing xxswapd instruction patterns lack support for the V2DF and V2DI modes. Support for these modes is required for certain new instruction patterns that are being implemented.
This patch adds the desired support. The patch has been bootstrapped and tested without regressions on powerpc64le-unknown-linux. Is this ok for trunk? gcc/ChangeLog: 2019-11-06 Kelvin Nilsen <kel...@gcc.gnu.org> * config/rs6000/vsx.md (xxswapd_<mode>): Add support for V2DF and V2DI modes. Index: gcc/config/rs6000/vsx.md =================================================================== --- gcc/config/rs6000/vsx.md (revision 277861) +++ gcc/config/rs6000/vsx.md (working copy) @@ -2987,6 +2987,17 @@ "xxpermdi %x0,%x1,%x1,2" [(set_attr "type" "vecperm")]) +(define_insn "xxswapd_<mode>" + [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa") + (vec_select:VSX_D + (match_operand:VSX_D 1 "vsx_register_operand" "wa") + (parallel [(const_int 1) (const_int 0)])))] + "TARGET_VSX" +;; AIX does not support extended mnemonic xxswapd. Use the basic +;; mnemonic xxpermdi instead. + "xxpermdi %x0,%x1,%x1,2" + [(set_attr "type" "vecperm")]) + ;; lxvd2x for little endian loads. We need several of ;; these since the form of the PARALLEL differs by mode. (define_insn "*vsx_lxvd2x2_le_<mode>"