From 9f0cb44e9b1da3676879b73728b31d421a8b1178 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Tue, 26 May 2020 18:51:37 +0200 Subject: [PATCH] i386: Add SSE2 alternative to mmx_pswapd2vsi2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2020-05-26 Uroš Bizjak gcc/ChangeLog: * config/i386/mmx.md (mmx_pswapdv2si2): Add SSE2 alternative. --- gcc/config/i386/mmx.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md index c31b4f81079..215162dedb5 100644 --- a/gcc/config/i386/mmx.md +++ b/gcc/config/i386/mmx.md @@ -2011,15 +2011,21 @@ (set_attr "mode" "TI")]) (define_insn "mmx_pswapdv2si2" - [(set (match_operand:V2SI 0 "register_operand" "=y") + [(set (match_operand:V2SI 0 "register_operand" "=y,Yv") (vec_select:V2SI - (match_operand:V2SI 1 "nonimmediate_operand" "ym") + (match_operand:V2SI 1 "register_mmxmem_operand" "ym,Yv") (parallel [(const_int 1) (const_int 0)])))] - "TARGET_3DNOW_A" - "pswapd\t{%1, %0|%0, %1}" - [(set_attr "type" "mmxcvt") - (set_attr "prefix_extra" "1") - (set_attr "mode" "DI")]) + "TARGET_3DNOW_A || TARGET_MMX_WITH_SSE" + "@ + pswapd\t{%1, %0|%0, %1} + %vpshufd\t{$0xe1, %1, %0|%0, %1, 0xe1}"; + [(set_attr "isa" "*,sse2") + (set_attr "mmx_isa" "native,*") + (set_attr "type" "mmxcvt,sselog1") + (set_attr "prefix_extra" "1,*") + (set_attr "prefix_data16" "*,1") + (set_attr "length_immediate" "*,1") + (set_attr "mode" "DI,TI")]) (define_insn "*vec_dupv4hi" [(set (match_operand:V4HI 0 "register_operand" "=y,xYw") -- 2.30.2