re PR rtl-optimization/28096 (fdlibm/strtod.c miscompiled at -O2)
PR rtl-optimization/28096 * ifcvt.c (check_cond_move_block): Return FALSE if the source of an assignment has already been used as a destination earlier in the block. From-SVN: r117331
This commit is contained in:
parent
10d2ebc511
commit
2d72242356
|
@ -1,4 +1,10 @@
|
||||||
2006-09-28 Eric Botcazou <ebotcazou@adacore.com>
|
2006-09-30 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||||
|
|
||||||
|
PR rtl-optimization/28096
|
||||||
|
* ifcvt.c (check_cond_move_block): Return FALSE if the source of an
|
||||||
|
assignment has already been used as a destination earlier in the block.
|
||||||
|
|
||||||
|
2006-09-29 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* builtins.c (expand_builtin_setjmp): Delete.
|
* builtins.c (expand_builtin_setjmp): Delete.
|
||||||
(expand_builtin) <BUILT_IN_SETJMP>: Mark as unreachable.
|
(expand_builtin) <BUILT_IN_SETJMP>: Mark as unreachable.
|
||||||
|
|
10
gcc/ifcvt.c
10
gcc/ifcvt.c
|
@ -2424,7 +2424,7 @@ check_cond_move_block (basic_block bb, rtx *vals, rtx cond)
|
||||||
src = SET_SRC (set);
|
src = SET_SRC (set);
|
||||||
if (!REG_P (dest)
|
if (!REG_P (dest)
|
||||||
|| (SMALL_REGISTER_CLASSES && HARD_REGISTER_P (dest)))
|
|| (SMALL_REGISTER_CLASSES && HARD_REGISTER_P (dest)))
|
||||||
return false;
|
return FALSE;
|
||||||
|
|
||||||
if (!CONSTANT_P (src) && !register_operand (src, VOIDmode))
|
if (!CONSTANT_P (src) && !register_operand (src, VOIDmode))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -2435,6 +2435,14 @@ check_cond_move_block (basic_block bb, rtx *vals, rtx cond)
|
||||||
if (may_trap_p (src) || may_trap_p (dest))
|
if (may_trap_p (src) || may_trap_p (dest))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
/* Don't try to handle this if the source register was
|
||||||
|
modified earlier in the block. */
|
||||||
|
if ((REG_P (src)
|
||||||
|
&& vals[REGNO (src)] != NULL)
|
||||||
|
|| (GET_CODE (src) == SUBREG && REG_P (SUBREG_REG (src))
|
||||||
|
&& vals[REGNO (SUBREG_REG (src))] != NULL))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/* Don't try to handle this if the destination register was
|
/* Don't try to handle this if the destination register was
|
||||||
modified earlier in the block. */
|
modified earlier in the block. */
|
||||||
if (vals[REGNO (dest)] != NULL)
|
if (vals[REGNO (dest)] != NULL)
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2006-09-30 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||||
|
|
||||||
|
* gcc.c-torture/execute/20060930-1.c: New test.
|
||||||
|
|
||||||
2006-09-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
2006-09-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||||
|
|
||||||
PR fortran/18791
|
PR fortran/18791
|
||||||
|
@ -15,7 +19,7 @@
|
||||||
* gfortran.dg/nearest_1.f90: Add -ffloat-store to defeat extra
|
* gfortran.dg/nearest_1.f90: Add -ffloat-store to defeat extra
|
||||||
precision on some archs.
|
precision on some archs.
|
||||||
|
|
||||||
2006-09-28 Eric Botcazou <ebotcazou@adacore.com>
|
2006-09-29 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* gcc.dg/non-local-goto-1.c: New test.
|
* gcc.dg/non-local-goto-1.c: New test.
|
||||||
* gcc.dg/non-local-goto-2.c: Likewise.
|
* gcc.dg/non-local-goto-2.c: Likewise.
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
/* PR rtl-optimization/28096 */
|
||||||
|
/* Origin: Jan Stein <jan@gatespacetelematics.com> */
|
||||||
|
|
||||||
|
extern void abort (void);
|
||||||
|
|
||||||
|
int bar (int, int) __attribute__((noinline));
|
||||||
|
int bar (int a, int b)
|
||||||
|
{
|
||||||
|
if (b != 1)
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
|
||||||
|
void foo(int, int) __attribute__((noinline));
|
||||||
|
void foo (int e, int n)
|
||||||
|
{
|
||||||
|
int i, bb2, bb5;
|
||||||
|
|
||||||
|
if (e > 0)
|
||||||
|
e = -e;
|
||||||
|
|
||||||
|
for (i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
if (e >= 0)
|
||||||
|
{
|
||||||
|
bb2 = 0;
|
||||||
|
bb5 = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bb5 = -e;
|
||||||
|
bb2 = bb5;
|
||||||
|
}
|
||||||
|
|
||||||
|
bar (bb5, bb2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
foo (1, 1);
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue