re PR target/57777 (Python module fails compilation with "-march=core-avx2 -O3")
PR target/57777 * config/i386/predicates.md (vsib_address_operand): Disallow SYMBOL_REF or LABEL_REF in parts.disp if TARGET_64BIT && flag_pic. * gcc.target/i386/pr57777.c: New test. From-SVN: r200649
This commit is contained in:
parent
2febd8772b
commit
f7bc421d11
4 changed files with 43 additions and 12 deletions
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -880,19 +880,28 @@
|
|||
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;
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
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.
|
||||
|
||||
|
|
13
gcc/testsuite/gcc.target/i386/pr57777.c
Normal file
13
gcc/testsuite/gcc.target/i386/pr57777.c
Normal file
|
@ -0,0 +1,13 @@
|
|||
/* 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];
|
||||
}
|
Loading…
Add table
Reference in a new issue