re PR tree-optimization/63380 (Wrong constant folding)
2014-10-09 Richard Biener <rguenther@suse.de> PR tree-optimization/63380 * tree-ssa-tail-merge.c (stmt_local_def): Exclude stmts that may trap. * gcc.dg/torture/pr63380-1.c: New testcase. * gcc.dg/torture/pr63380-2.c: Likewise. From-SVN: r216038
This commit is contained in:
parent
3b7ea188c0
commit
12d3031b2c
|
@ -1,3 +1,9 @@
|
||||||
|
2014-10-09 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/63380
|
||||||
|
* tree-ssa-tail-merge.c (stmt_local_def): Exclude stmts that
|
||||||
|
may trap.
|
||||||
|
|
||||||
2014-10-09 Joern Rennecke <joern.rennecke@embecosm.com>
|
2014-10-09 Joern Rennecke <joern.rennecke@embecosm.com>
|
||||||
|
|
||||||
* config/avr/avr.opt (mmcu=): Change to have a string value.
|
* config/avr/avr.opt (mmcu=): Change to have a string value.
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2014-10-09 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/63380
|
||||||
|
* gcc.dg/torture/pr63380-1.c: New testcase.
|
||||||
|
* gcc.dg/torture/pr63380-2.c: Likewise.
|
||||||
|
|
||||||
2014-10-09 Marek Polacek <polacek@redhat.com>
|
2014-10-09 Marek Polacek <polacek@redhat.com>
|
||||||
|
|
||||||
PR c/63480
|
PR c/63480
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
/* { dg-do run } */
|
||||||
|
|
||||||
|
int a = 0, b = 1, c = 0, d = 1, e, f, g, h;
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
e = 1 >> d;
|
||||||
|
f = ((31 / (1 > e)) || c) / 2;
|
||||||
|
g = b || a;
|
||||||
|
h = 31 / g;
|
||||||
|
if (!h)
|
||||||
|
__builtin_abort();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
/* { dg-do run } */
|
||||||
|
|
||||||
|
int a = 0, b = 0, c = 0, d, e;
|
||||||
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
d = ((20 % (1 != b)) && c) + 2147483647;
|
||||||
|
e = 20 % (a >= 0);
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -313,9 +313,9 @@ stmt_local_def (gimple stmt)
|
||||||
tree val;
|
tree val;
|
||||||
def_operand_p def_p;
|
def_operand_p def_p;
|
||||||
|
|
||||||
if (gimple_has_side_effects (stmt)
|
if (gimple_vdef (stmt) != NULL_TREE
|
||||||
|| stmt_could_throw_p (stmt)
|
|| gimple_has_side_effects (stmt)
|
||||||
|| gimple_vdef (stmt) != NULL_TREE)
|
|| gimple_could_trap_p_1 (stmt, false, false))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
def_p = SINGLE_SSA_DEF_OPERAND (stmt, SSA_OP_DEF);
|
def_p = SINGLE_SSA_DEF_OPERAND (stmt, SSA_OP_DEF);
|
||||||
|
|
Loading…
Reference in New Issue