summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Love <cel@us.ibm.com>2019-09-23 20:08:13 +0000
committerCarl Love <carll@gcc.gnu.org>2019-09-23 20:08:13 +0000
commita8cea25c734906e622113369704101617ef34c31 (patch)
tree568681990c013c7d50742b6d7918728c310b239d
parent0788210f804a2ba451bc9cbda26c256ad9f7c5f3 (diff)
RS6000, add xxswapd support
gcc/ChangeLog: 2019-09-23 Carl Love <cel@us.ibm.com> * config/rs6000/vsx.md (xxswapd_v4si, xxswapd_v8hi, xxswapd_v16qi): New define_insn. (vsx_xxpermdi4_le_<mode> for VSX_W, vsx_xxpermdi8_le_V8HI, vsx_xxpermdi16_le_V16QI): Removed define_insn. From-SVN: r276065
-rw-r--r--ChangeLog7
-rw-r--r--gcc/config/rs6000/vsx.md62
2 files changed, 41 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index 5740a218078..a35ade95d15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-09-23 Carl Love <cel@us.ibm.com>
+
+ * config/rs6000/vsx.md (xxswapd_v4si, xxswapd_v8hi, xxswapd_v16qi):
+ New define_insn.
+ (vsx_xxpermdi4_le_<mode> for VSX_W, vsx_xxpermdi8_le_V8HI,
+ vsx_xxpermdi16_le_V16QI): Removed define_insn.
+
2019-09-13 Sam Tebbs <sam.tebbs@arm.com>
* MAINTAINERS (Sam Tebbs): Update email address.
diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md
index 7633171df9c..91f5feddcf3 100644
--- a/gcc/config/rs6000/vsx.md
+++ b/gcc/config/rs6000/vsx.md
@@ -2941,41 +2941,47 @@
"xxpermdi %x0,%x1,%x1,2"
[(set_attr "type" "vecperm")])
-(define_insn "*vsx_xxpermdi4_le_<mode>"
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
- (vec_select:VSX_W
- (match_operand:VSX_W 1 "vsx_register_operand" "wa")
- (parallel [(const_int 2) (const_int 3)
- (const_int 0) (const_int 1)])))]
- "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
+(define_insn "xxswapd_v16qi"
+ [(set (match_operand:V16QI 0 "vsx_register_operand" "=wa")
+ (vec_select:V16QI
+ (match_operand:V16QI 1 "vsx_register_operand" "wa")
+ (parallel [(const_int 8) (const_int 9)
+ (const_int 10) (const_int 11)
+ (const_int 12) (const_int 13)
+ (const_int 14) (const_int 15)
+ (const_int 0) (const_int 1)
+ (const_int 2) (const_int 3)
+ (const_int 4) (const_int 5)
+ (const_int 6) (const_int 7)])))]
+ "TARGET_VSX"
+;; AIX does not support the extended mnemonic xxswapd. Use the basic
+;; mnemonic xxpermdi instead.
"xxpermdi %x0,%x1,%x1,2"
[(set_attr "type" "vecperm")])
-(define_insn "*vsx_xxpermdi8_le_V8HI"
+(define_insn "xxswapd_v8hi"
[(set (match_operand:V8HI 0 "vsx_register_operand" "=wa")
- (vec_select:V8HI
- (match_operand:V8HI 1 "vsx_register_operand" "wa")
- (parallel [(const_int 4) (const_int 5)
- (const_int 6) (const_int 7)
- (const_int 0) (const_int 1)
- (const_int 2) (const_int 3)])))]
- "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (V8HImode)"
+ (vec_select:V8HI
+ (match_operand:V8HI 1 "vsx_register_operand" "wa")
+ (parallel [(const_int 4) (const_int 5)
+ (const_int 6) (const_int 7)
+ (const_int 0) (const_int 1)
+ (const_int 2) (const_int 3)])))]
+ "TARGET_VSX"
+;; AIX does not support the extended mnemonic xxswapd. Use the basic
+;; mnemonic xxpermdi instead.
"xxpermdi %x0,%x1,%x1,2"
[(set_attr "type" "vecperm")])
-(define_insn "*vsx_xxpermdi16_le_V16QI"
- [(set (match_operand:V16QI 0 "vsx_register_operand" "=wa")
- (vec_select:V16QI
- (match_operand:V16QI 1 "vsx_register_operand" "wa")
- (parallel [(const_int 8) (const_int 9)
- (const_int 10) (const_int 11)
- (const_int 12) (const_int 13)
- (const_int 14) (const_int 15)
- (const_int 0) (const_int 1)
- (const_int 2) (const_int 3)
- (const_int 4) (const_int 5)
- (const_int 6) (const_int 7)])))]
- "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (V16QImode)"
+(define_insn "xxswapd_<mode>"
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
+ (vec_select:VSX_W
+ (match_operand:VSX_W 1 "vsx_register_operand" "wa")
+ (parallel [(const_int 2) (const_int 3)
+ (const_int 0) (const_int 1)])))]
+ "TARGET_VSX"
+;; AIX does not support extended mnemonic xxswapd. Use the basic
+;; mnemonic xxpermdi instead.
"xxpermdi %x0,%x1,%x1,2"
[(set_attr "type" "vecperm")])