Message ID | a9ea4530-187b-5986-ee42-294b8d93e6c9@linux.ibm.com |
---|---|
State | New |
Headers | show |
Series | [rs6000] Add xxswapd support for V2DF and V2DI modes | expand |
Hi! On Wed, Nov 06, 2019 at 10:41:42AM -0600, Kelvin Nilsen wrote: > 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. Okay for trunk. Thanks! Segher > 2019-11-06 Kelvin Nilsen <kelvin@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>"