+2013-07-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/57777
+ * config/i386/predicates.md (vsib_address_operand): Disallow
+ SYMBOL_REF or LABEL_REF in parts.disp if TARGET_64BIT && flag_pic.
+
2013-07-03 Hans-Peter Nilsson <hp@bitrange.com>
PR middle-end/55030
return false;
/* VSIB addressing doesn't support (%rip). */
- if (parts.disp && GET_CODE (parts.disp) == CONST)
+ if (parts.disp)
{
- disp = XEXP (parts.disp, 0);
- if (GET_CODE (disp) == PLUS)
- disp = XEXP (disp, 0);
- if (GET_CODE (disp) == UNSPEC)
- switch (XINT (disp, 1))
- {
- case UNSPEC_GOTPCREL:
- case UNSPEC_PCREL:
- case UNSPEC_GOTNTPOFF:
- return false;
- }
+ disp = parts.disp;
+ if (GET_CODE (disp) == CONST)
+ {
+ disp = XEXP (disp, 0);
+ if (GET_CODE (disp) == PLUS)
+ disp = XEXP (disp, 0);
+ if (GET_CODE (disp) == UNSPEC)
+ switch (XINT (disp, 1))
+ {
+ case UNSPEC_GOTPCREL:
+ case UNSPEC_PCREL:
+ case UNSPEC_GOTNTPOFF:
+ return false;
+ }
+ }
+ if (TARGET_64BIT
+ && flag_pic
+ && (GET_CODE (disp) == SYMBOL_REF
+ || GET_CODE (disp) == LABEL_REF))
+ return false;
}
return true;
2013-07-03 Jakub Jelinek <jakub@redhat.com>
+ PR target/57777
+ * gcc.target/i386/pr57777.c: New test.
+
PR c++/57771
* g++.dg/template/arg9.C: New test.
--- /dev/null
+/* PR target/57777 */
+/* { dg-do assemble { target avx2 } } */
+/* { dg-options "-O3 -mavx2" } */
+/* { dg-additional-options "-fpic" { target fpic } } */
+
+void
+foo (unsigned long *x, int *y)
+{
+ static unsigned long b[2] = { 0x0UL, 0x9908b0dfUL };
+ int c;
+ for (c = 0; c < 512; c++)
+ x[c] = b[x[c] & 1UL];
+}