aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPeter Bergner <bergner@vnet.ibm.com>2018-01-10 14:49:36 -0600
committerPeter Bergner <bergner@gcc.gnu.org>2018-01-10 14:49:36 -0600
commit2025a48d089d09011b60c1f5eb981ef71c79be4e (patch)
treedd941c40ec43f7481695020d937b5a5fbb5072b4 /gcc
parent9e0fa36ae82efe128f5dcbc85dc24365f7390fe1 (diff)
downloadgcc-2025a48d089d09011b60c1f5eb981ef71c79be4e.zip
gcc-2025a48d089d09011b60c1f5eb981ef71c79be4e.tar.gz
gcc-2025a48d089d09011b60c1f5eb981ef71c79be4e.tar.bz2
re PR target/83399 (Power8 ICE During LRA with 2-op rtl pattern for lvx instruction)
gcc/ PR target/83399 * config/rs6000/rs6000.c (print_operand) <'y'>: Use VECTOR_MEM_ALTIVEC_OR_VSX_P. * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use indexed_or_indirect_operand predicate. (*vsx_le_perm_load_<mode> for VSX_W): Likewise. (*vsx_le_perm_load_v8hi): Likewise. (*vsx_le_perm_load_v16qi): Likewise. (*vsx_le_perm_store_<mode> for VSX_D): Likewise. (*vsx_le_perm_store_<mode> for VSX_W): Likewise. (*vsx_le_perm_store_v8hi): Likewise. (*vsx_le_perm_store_v16qi): Likewise. (eight unnamed splitters): Likewise. gcc/testsuite/ PR target/83399 * gcc.target/powerpc/pr83399.c: New test. From-SVN: r256453
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog16
-rw-r--r--gcc/config/rs6000/rs6000.c2
-rw-r--r--gcc/config/rs6000/vsx.md32
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr83399.c15
5 files changed, 53 insertions, 17 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ab2c2cc..7a989b4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,21 @@
2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
+ PR target/83399
+ * config/rs6000/rs6000.c (print_operand) <'y'>: Use
+ VECTOR_MEM_ALTIVEC_OR_VSX_P.
+ * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
+ indexed_or_indirect_operand predicate.
+ (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
+ (*vsx_le_perm_load_v8hi): Likewise.
+ (*vsx_le_perm_load_v16qi): Likewise.
+ (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
+ (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
+ (*vsx_le_perm_store_v8hi): Likewise.
+ (*vsx_le_perm_store_v16qi): Likewise.
+ (eight unnamed splitters): Likewise.
+
+2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
+
* config/rs6000/x86intrin.h: Change #warning to #error. Update message.
* config/rs6000/emmintrin.h: Likewise.
* config/rs6000/mmintrin.h: Likewise.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index a6f3e4e..f3df0b9 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -21671,7 +21671,7 @@ print_operand (FILE *file, rtx x, int code)
tmp = XEXP (x, 0);
- if (VECTOR_MEM_ALTIVEC_P (GET_MODE (x))
+ if (VECTOR_MEM_ALTIVEC_OR_VSX_P (GET_MODE (x))
&& GET_CODE (tmp) == AND
&& GET_CODE (XEXP (tmp, 1)) == CONST_INT
&& INTVAL (XEXP (tmp, 1)) == -16)
diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md
index effa6c1..e0d76b1 100644
--- a/gcc/config/rs6000/vsx.md
+++ b/gcc/config/rs6000/vsx.md
@@ -431,7 +431,7 @@
;; VSX moves so they match first.
(define_insn_and_split "*vsx_le_perm_load_<mode>"
[(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSa>")
- (match_operand:VSX_D 1 "memory_operand" "Z"))]
+ (match_operand:VSX_D 1 "indexed_or_indirect_operand" "Z"))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR"
"#"
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR"
@@ -454,7 +454,7 @@
(define_insn_and_split "*vsx_le_perm_load_<mode>"
[(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
- (match_operand:VSX_W 1 "memory_operand" "Z"))]
+ (match_operand:VSX_W 1 "indexed_or_indirect_operand" "Z"))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR"
"#"
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR"
@@ -479,7 +479,7 @@
(define_insn_and_split "*vsx_le_perm_load_v8hi"
[(set (match_operand:V8HI 0 "vsx_register_operand" "=wa")
- (match_operand:V8HI 1 "memory_operand" "Z"))]
+ (match_operand:V8HI 1 "indexed_or_indirect_operand" "Z"))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR"
"#"
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR"
@@ -508,7 +508,7 @@
(define_insn_and_split "*vsx_le_perm_load_v16qi"
[(set (match_operand:V16QI 0 "vsx_register_operand" "=wa")
- (match_operand:V16QI 1 "memory_operand" "Z"))]
+ (match_operand:V16QI 1 "indexed_or_indirect_operand" "Z"))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR"
"#"
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR"
@@ -544,7 +544,7 @@
(set_attr "length" "8")])
(define_insn "*vsx_le_perm_store_<mode>"
- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
+ [(set (match_operand:VSX_D 0 "indexed_or_indirect_operand" "=Z")
(match_operand:VSX_D 1 "vsx_register_operand" "+<VSa>"))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR"
"#"
@@ -552,7 +552,7 @@
(set_attr "length" "12")])
(define_split
- [(set (match_operand:VSX_D 0 "memory_operand" "")
+ [(set (match_operand:VSX_D 0 "indexed_or_indirect_operand" "")
(match_operand:VSX_D 1 "vsx_register_operand" ""))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR && !reload_completed"
[(set (match_dup 2)
@@ -571,7 +571,7 @@
;; The post-reload split requires that we re-permute the source
;; register in case it is still live.
(define_split
- [(set (match_operand:VSX_D 0 "memory_operand" "")
+ [(set (match_operand:VSX_D 0 "indexed_or_indirect_operand" "")
(match_operand:VSX_D 1 "vsx_register_operand" ""))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR && reload_completed"
[(set (match_dup 1)
@@ -589,7 +589,7 @@
"")
(define_insn "*vsx_le_perm_store_<mode>"
- [(set (match_operand:VSX_W 0 "memory_operand" "=Z")
+ [(set (match_operand:VSX_W 0 "indexed_or_indirect_operand" "=Z")
(match_operand:VSX_W 1 "vsx_register_operand" "+<VSa>"))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR"
"#"
@@ -597,7 +597,7 @@
(set_attr "length" "12")])
(define_split
- [(set (match_operand:VSX_W 0 "memory_operand" "")
+ [(set (match_operand:VSX_W 0 "indexed_or_indirect_operand" "")
(match_operand:VSX_W 1 "vsx_register_operand" ""))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR && !reload_completed"
[(set (match_dup 2)
@@ -618,7 +618,7 @@
;; The post-reload split requires that we re-permute the source
;; register in case it is still live.
(define_split
- [(set (match_operand:VSX_W 0 "memory_operand" "")
+ [(set (match_operand:VSX_W 0 "indexed_or_indirect_operand" "")
(match_operand:VSX_W 1 "vsx_register_operand" ""))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR && reload_completed"
[(set (match_dup 1)
@@ -639,7 +639,7 @@
"")
(define_insn "*vsx_le_perm_store_v8hi"
- [(set (match_operand:V8HI 0 "memory_operand" "=Z")
+ [(set (match_operand:V8HI 0 "indexed_or_indirect_operand" "=Z")
(match_operand:V8HI 1 "vsx_register_operand" "+wa"))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR"
"#"
@@ -647,7 +647,7 @@
(set_attr "length" "12")])
(define_split
- [(set (match_operand:V8HI 0 "memory_operand" "")
+ [(set (match_operand:V8HI 0 "indexed_or_indirect_operand" "")
(match_operand:V8HI 1 "vsx_register_operand" ""))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR && !reload_completed"
[(set (match_dup 2)
@@ -672,7 +672,7 @@
;; The post-reload split requires that we re-permute the source
;; register in case it is still live.
(define_split
- [(set (match_operand:V8HI 0 "memory_operand" "")
+ [(set (match_operand:V8HI 0 "indexed_or_indirect_operand" "")
(match_operand:V8HI 1 "vsx_register_operand" ""))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR && reload_completed"
[(set (match_dup 1)
@@ -699,7 +699,7 @@
"")
(define_insn "*vsx_le_perm_store_v16qi"
- [(set (match_operand:V16QI 0 "memory_operand" "=Z")
+ [(set (match_operand:V16QI 0 "indexed_or_indirect_operand" "=Z")
(match_operand:V16QI 1 "vsx_register_operand" "+wa"))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR"
"#"
@@ -707,7 +707,7 @@
(set_attr "length" "12")])
(define_split
- [(set (match_operand:V16QI 0 "memory_operand" "")
+ [(set (match_operand:V16QI 0 "indexed_or_indirect_operand" "")
(match_operand:V16QI 1 "vsx_register_operand" ""))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR && !reload_completed"
[(set (match_dup 2)
@@ -740,7 +740,7 @@
;; The post-reload split requires that we re-permute the source
;; register in case it is still live.
(define_split
- [(set (match_operand:V16QI 0 "memory_operand" "")
+ [(set (match_operand:V16QI 0 "indexed_or_indirect_operand" "")
(match_operand:V16QI 1 "vsx_register_operand" ""))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR && reload_completed"
[(set (match_dup 1)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6091e59..5fdb4701 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/83399
+ * gcc.target/powerpc/pr83399.c: New test.
+
2018-01-10 David Malcolm <dmalcolm@redhat.com>
PR c++/43486
diff --git a/gcc/testsuite/gcc.target/powerpc/pr83399.c b/gcc/testsuite/gcc.target/powerpc/pr83399.c
new file mode 100644
index 0000000..96d9b38
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr83399.c
@@ -0,0 +1,15 @@
+/* PR target/83399 */
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O1 -mabi=elfv2 -mlittle -mvsx" } */
+
+typedef __attribute__((altivec(vector__))) int v4si_t;
+int
+foo (void)
+{
+ v4si_t a, u, v, y;
+ u = __builtin_altivec_lvx (32, ((void *) &a) - 32);
+ v = __builtin_altivec_lvx (64, ((void *) &a) - 32);
+ y = u + v;
+ return y[0];
+}