Fix rs6000_legitimate_address_p(), which erroneously marks a valid Altivec
address as being invalid, which causes LRA's process_address() to go into
an infinite loop spilling the same address over and over again.
Include Mike's earlier commits that fix bugs this patch exposes.
Backport from master
2020-02-20 Peter Bergner <bergner@linux.ibm.com>
PR target/93658
* config/rs6000/rs6000.c (rs6000_legitimate_address_p): Handle VSX
vector modes.
* gcc.target/powerpc/pr93658.c: New test.
+2020-02-23 Peter Bergner <bergner@linux.ibm.com>
+
+ Backport from master
+ 2020-02-20 Peter Bergner <bergner@linux.ibm.com>
+
+ PR target/93658
+ * config/rs6000/rs6000.c (rs6000_legitimate_address_p): Handle VSX
+ vector modes.
+
2020-02-23 Peter Bergner <bergner@linux.ibm.com>
Backport from master
bool quad_offset_p = mode_supports_dq_form (mode);
/* If this is an unaligned stvx/ldvx type address, discard the outer AND. */
- if (VECTOR_MEM_ALTIVEC_P (mode)
+ if (VECTOR_MEM_ALTIVEC_OR_VSX_P (mode)
&& GET_CODE (x) == AND
&& CONST_INT_P (XEXP (x, 1))
&& INTVAL (XEXP (x, 1)) == -16)
+2020-02-23 Peter Bergner <bergner@linux.ibm.com>
+
+ Backport from master
+ 2020-02-20 Peter Bergner <bergner@linux.ibm.com>
+
+ PR target/93658
+ * gcc.target/powerpc/pr93658.c: New test.
+
2020-02-20 H.J. Lu <hongjiu.lu@intel.com>
Backport from master
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O3 -fstack-protector-strong -mcpu=power8" } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+
+/* PR93658: Failure compiling this test is an infinite loop in LRA's
+ process_address(), so set a short timeout limit. */
+/* { dg-timeout 5 } */
+
+void bar();
+char b;
+void
+foo (void)
+{
+ char a;
+ int d = b;
+ char *e = &a;
+ while (d)
+ *e++ = --d;
+ bar ();
+}