[gcc/devel/c++-modules] i386: Add SSE2 alternative to mmx_pswapd2vsi2
Nathan Sidwell
nathan@gcc.gnu.org
Wed Jun 10 16:47:07 GMT 2020
https://gcc.gnu.org/g:9f0cb44e9b1da3676879b73728b31d421a8b1178
commit 9f0cb44e9b1da3676879b73728b31d421a8b1178
Author: Uros Bizjak <ubizjak@gmail.com>
Date: Tue May 26 18:51:37 2020 +0200
i386: Add SSE2 alternative to mmx_pswapd2vsi2
2020-05-26 Uroš Bizjak <ubizjak@gmail.com>
gcc/ChangeLog:
* config/i386/mmx.md (mmx_pswapdv2si2): Add SSE2 alternative.
Diff:
---
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")
More information about the Gcc-cvs
mailing list