re PR target/63534 (Bootstrap failure on x86_64/i686-linux)
PR target/63534 PR target/63618 gcc/ * cse.c (delete_trivially_dead_insns): Consider PIC register is used while it is pseudo. * dse.c (deletable_insn_p): Likewise. gcc/testsuite/ * gcc.target/i386/pr63618.c: New test. From-SVN: r216596
This commit is contained in:
parent
1bc5a4513e
commit
56873e1342
5 changed files with 57 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
|||
2014-10-23 Evgeny Stupachenko <evstupac@gmail.com>
|
||||
|
||||
PR target/63534
|
||||
PR target/63618
|
||||
* cse.c (delete_trivially_dead_insns): Consider PIC register is used
|
||||
while it is pseudo.
|
||||
* dse.c (deletable_insn_p): Likewise.
|
||||
|
||||
2014-10-23 Georg-Johann Lay <avr@gjlay.de>
|
||||
|
||||
* config/avr/avr.c: Fix GNU coding rules and typos.
|
||||
|
|
|
@ -6957,6 +6957,12 @@ delete_trivially_dead_insns (rtx_insn *insns, int nreg)
|
|||
/* If no debug insns can be present, COUNTS is just an array
|
||||
which counts how many times each pseudo is used. */
|
||||
}
|
||||
/* Pseudo PIC register should be considered as used due to possible
|
||||
new usages generated. */
|
||||
if (!reload_completed
|
||||
&& pic_offset_table_rtx
|
||||
&& REGNO (pic_offset_table_rtx) >= FIRST_PSEUDO_REGISTER)
|
||||
counts[REGNO (pic_offset_table_rtx)]++;
|
||||
/* Go from the last insn to the first and delete insns that only set unused
|
||||
registers or copy a register to itself. As we delete an insn, remove
|
||||
usage counts for registers it uses.
|
||||
|
|
|
@ -127,6 +127,10 @@ deletable_insn_p (rtx_insn *insn, bool fast, bitmap arg_stores)
|
|||
if (HARD_REGISTER_NUM_P (DF_REF_REGNO (def))
|
||||
&& global_regs[DF_REF_REGNO (def)])
|
||||
return false;
|
||||
/* Initialization of pseudo PIC register should never be removed. */
|
||||
else if (DF_REF_REG (def) == pic_offset_table_rtx
|
||||
&& REGNO (pic_offset_table_rtx) >= FIRST_PSEUDO_REGISTER)
|
||||
return false;
|
||||
|
||||
body = PATTERN (insn);
|
||||
switch (GET_CODE (body))
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2014-10-23 Evgeny Stupachenko <evstupac@gmail.com>
|
||||
|
||||
PR target/63618
|
||||
* gcc.target/i386/pr63618.c: New test.
|
||||
|
||||
2014-10-23 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c/63626
|
||||
|
|
34
gcc/testsuite/gcc.target/i386/pr63618.c
Normal file
34
gcc/testsuite/gcc.target/i386/pr63618.c
Normal file
|
@ -0,0 +1,34 @@
|
|||
/* PR target/63618 */
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-O2 -mtune=corei7 -fno-inline" } */
|
||||
/* { dg-additional-options "-msse4.2" { target sse4 } } */
|
||||
/* { dg-additional-options "-fpic" { target fpic } } */
|
||||
|
||||
static const __float128 cf = 0.1E+10Q;
|
||||
|
||||
__float128
|
||||
f128_square(__float128 x)
|
||||
{
|
||||
return x * x;
|
||||
}
|
||||
|
||||
__float128
|
||||
f128_p3(__float128 x)
|
||||
{
|
||||
return x * x * x;
|
||||
}
|
||||
|
||||
__float128
|
||||
cond_f128_square (__float128 x, int p)
|
||||
{
|
||||
x = f128_p3 (x);
|
||||
if (p)
|
||||
x = f128_square(cf);
|
||||
return x;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
__float128 x = cond_f128_square (cf, 1);
|
||||
return (int)(x < cf);
|
||||
}
|
Loading…
Add table
Reference in a new issue