2017-05-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2016-08-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/77377
+ * simplify-rtx.c (avoid_constant_pool_reference): For out of bounds
+ constant pool reference return x instead of c.
+
2016-08-16 Jakub Jelinek <jakub@redhat.com>
PR target/71910
/* If we're accessing the constant in a different mode than it was
originally stored, attempt to fix that up via subreg simplifications.
If that fails we have no choice but to return the original memory. */
- if ((offset != 0 || cmode != GET_MODE (x))
- && offset >= 0 && offset < GET_MODE_SIZE (cmode))
+ if (offset == 0 && cmode == GET_MODE (x))
+ return c;
+ else if (offset >= 0 && offset < GET_MODE_SIZE (cmode))
{
rtx tem = simplify_subreg (GET_MODE (x), c, cmode, offset);
if (tem && CONSTANT_P (tem))
return tem;
}
- else
- return c;
}
return x;
2017-05-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2016-08-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/77377
+ * gcc.target/i386/pr77377.c: New test.
+
2016-08-16 Jakub Jelinek <jakub@redhat.com>
PR target/71910
--- /dev/null
+/* PR middle-end/77377 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -msse" } */
+/* { dg-additional-options "-fpic" { target fpic } } */
+
+#include "../../c-c++-common/pr59037.c"