mirror of git://gcc.gnu.org/git/gcc.git
re PR tree-optimization/57411 (ICE: verify_ssa failed: definition in block 4 does not dominate use in block 11 with -fno-tree-dce -ftree-vectorize)
2013-05-28 Richard Biener <rguenther@suse.de> PR tree-optimization/57411 * tree-ssa-copy.c (may_propagate_copy): Cannot propagate virtual operands. * tree-ssa-dom.c (eliminate_const_or_copy): Special-case virtual operand propagation. * g++.dg/opt/pr57411.C: New testcase. From-SVN: r199374
This commit is contained in:
parent
95f803bd9b
commit
bd388c2a87
|
|
@ -1,3 +1,11 @@
|
||||||
|
2013-05-28 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/57411
|
||||||
|
* tree-ssa-copy.c (may_propagate_copy): Cannot propagate
|
||||||
|
virtual operands.
|
||||||
|
* tree-ssa-dom.c (eliminate_const_or_copy): Special-case
|
||||||
|
virtual operand propagation.
|
||||||
|
|
||||||
2013-05-28 Eric Botcazou <ebotcazou@adacore.com>
|
2013-05-28 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* config/sparc/sparc.c (sparc_expand_vec_perm_bmask): Use %g0 as
|
* config/sparc/sparc.c (sparc_expand_vec_perm_bmask): Use %g0 as
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2013-05-28 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/57411
|
||||||
|
* g++.dg/opt/pr57411.C: New testcase.
|
||||||
|
|
||||||
2013-05-28 Eric Botcazou <ebotcazou@adacore.com>
|
2013-05-28 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* gcc.dg/builtin-bswap-8.c: Compile at -O2.
|
* gcc.dg/builtin-bswap-8.c: Compile at -O2.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
// { dg-do compile }
|
||||||
|
// { dg-options "-O -fno-tree-dce -ftree-vectorize" }
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
iota (int *__first, int *__last, int __value)
|
||||||
|
{
|
||||||
|
for (; __first != __last; ++__first)
|
||||||
|
{
|
||||||
|
*__first = __value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void assert_fail ();
|
||||||
|
|
||||||
|
int A[] = { 0, 0, 0 };
|
||||||
|
|
||||||
|
void
|
||||||
|
test01 (int equal)
|
||||||
|
{
|
||||||
|
iota (A, A + 3, 1);
|
||||||
|
if (equal)
|
||||||
|
assert_fail ();
|
||||||
|
}
|
||||||
|
|
@ -73,14 +73,10 @@ may_propagate_copy (tree dest, tree orig)
|
||||||
if (!useless_type_conversion_p (type_d, type_o))
|
if (!useless_type_conversion_p (type_d, type_o))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Propagating virtual operands is always ok. */
|
/* Generally propagating virtual operands is not ok as that may
|
||||||
|
create overlapping life-ranges. */
|
||||||
if (TREE_CODE (dest) == SSA_NAME && virtual_operand_p (dest))
|
if (TREE_CODE (dest) == SSA_NAME && virtual_operand_p (dest))
|
||||||
{
|
return false;
|
||||||
/* But only between virtual operands. */
|
|
||||||
gcc_assert (TREE_CODE (orig) == SSA_NAME && virtual_operand_p (orig));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Anything else is OK. */
|
/* Anything else is OK. */
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -2936,7 +2936,22 @@ eliminate_const_or_copy (gimple stmt, bitmap interesting_names)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!virtual_operand_p (lhs))
|
||||||
propagate_rhs_into_lhs (stmt, lhs, rhs, interesting_names);
|
propagate_rhs_into_lhs (stmt, lhs, rhs, interesting_names);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gimple use_stmt;
|
||||||
|
imm_use_iterator iter;
|
||||||
|
use_operand_p use_p;
|
||||||
|
/* For virtual operands we have to propagate into all uses as
|
||||||
|
otherwise we will create overlapping life-ranges. */
|
||||||
|
FOR_EACH_IMM_USE_STMT (use_stmt, iter, lhs)
|
||||||
|
FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
|
||||||
|
SET_USE (use_p, rhs);
|
||||||
|
if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs))
|
||||||
|
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs) = 1;
|
||||||
|
remove_stmt_or_phi (stmt);
|
||||||
|
}
|
||||||
|
|
||||||
/* Note that STMT may well have been deleted by now, so do
|
/* Note that STMT may well have been deleted by now, so do
|
||||||
not access it, instead use the saved version # to clear
|
not access it, instead use the saved version # to clear
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue