Commit 1031b577 by Richard Biener Committed by Richard Biener

re PR tree-optimization/82603 (ICE in ifcvt_local_dce w/ -O2 -ftree-loop-vectorize)

2017-10-20  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82603
	* tree-if-conv.c (predicate_mem_writes): Make sure to only
	remove false predicated stores.

	* gcc.dg/torture/pr82603.c: New testcase.

From-SVN: r253933
parent c46bd472
2017-10-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/82603
* tree-if-conv.c (predicate_mem_writes): Make sure to only
remove false predicated stores.
2017-10-20 Richard Biener <rguenther@suse.de>
* graphite-isl-ast-to-gimple.c
(translate_isl_ast_to_gimple::graphite_copy_stmts_from_block):
Remove return value and simplify, dump copied stmt after lhs
2017-10-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/82603
* gcc.dg/torture/pr82603.c: New testcase.
2017-10-20 Tom de Vries <tom@codesourcery.com>
* gcc.dg/tree-ssa/ldist-27.c: Remove dg-require-stack-size.
......
/* { dg-do compile } */
/* { dg-additional-options "-ftree-loop-vectorize" } */
int
mr (unsigned int lf, int ms)
{
unsigned int sw = 0;
char *cu = (char *)&ms;
while (ms < 1)
{
if (lf == 0)
ms = 0;
else
ms = 0;
ms += ((lf > 0) && ((lf > sw) ? 1 : ++*cu));
}
if (lf != 0)
cu = (char *)&sw;
*cu = lf;
return ms;
}
......@@ -2214,7 +2214,8 @@ predicate_mem_writes (loop_p loop)
{
if (!gimple_assign_single_p (stmt = gsi_stmt (gsi)))
;
else if (is_false_predicate (cond))
else if (is_false_predicate (cond)
&& gimple_vdef (stmt))
{
unlink_stmt_vdef (stmt);
gsi_remove (&gsi, true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment